8000 Jarvis in Vagrant · Issue #139 · zouhir/jarvis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Jarvis in Vagrant #139
Open
Open
@alexis-regnaud

Description

@alexis-regnaud

Hi,

I try to install Jarvis for a project in my vagrant but without success...

I add the package corretly, I configure my webpack.config and my VagrantFile, but in return I have the message : " This page does not work " on http://localhost:1337/

Next it's my webpack configuration :

// webpack.config.js
var Encore = require('@symfony/webpack-encore');

var path = require('path');

const Jarvis = require("webpack-jarvis");

console.log( path.resolve(__dirname, './web'));

Encore
// the project directory where all compiled assets will be stored
    .setOutputPath('web/build/')

    // the public path used by the web server to access the previous directory
    .setPublicPath('/build')


    /** Add entry **/

/*
    .createSharedEntry('vendor', [
        './node_modules/epic-spinners/dist/lib/epic-spinners.min.css',
    ])
*/

    // will create public/build/app.js and public/build/app.css
    .addEntry('polyfill', ["babel-polyfill"])
    .addEntry('app', './web/assets/js/app.js')
    .addEntry('entrypoint', './app/Resources/views/front/entrypoint.js')
    .addEntry('unityload', './web/assets/unity_map/Build/UnityLoader.js')

    //Style
    .addStyleEntry('app_style',[
        './web/assets/scss/app.scss'
    ])

     /***************/


    // allow legacy applications to use $/jQuery as a global variable
    .autoProvidejQuery()

    // enable source maps during development
    .enableSourceMaps(!Encore.isProduction())

    // empty the outputPath dir before each build
    .cleanupOutputBeforeBuild()

    // show OS notifications when builds finish/fail
    .enableBuildNotifications()

    // create hashed filenames (e.g. app.abc123.css)
    .enableVersioning(Encore.isProduction())

    // allow sass/scss files to be processed
    .enableSassLoader(function(sassOptions) {}, {
        resolveUrlLoader: false
    })

    // to enable vue
    .enableVueLoader()

    .enablePostCssLoader((options) => {
          options.config = {
                  path: './postcss.config.js'
          };
     })


    /** Add plugin **/

    .addPlugin(
        new Jarvis({
        port: 1337 // optional: set a port
    }))

    /***************/

;


let config = Encore.getWebpackConfig();
config.resolve.alias = {
    'assets': path.resolve(__dirname, './web/assets')
};


// export the final configuration
module.exports = config;
//module.exports = Encore.getWebpackConfig();


And it's my VagrantFile with the forwared port :

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.provision :shell, path: "bootstrap.sh"
  config.vm.network :forwarded_port, guest: 22, host: 2205, id: "ssh" #ssh
  config.vm.network :forwarded_port, guest: 80, host: 8005 #web
  config.vm.network "forwarded_port", guest: 3306, host: 33605 #mysql
  config.vm.network "forwarded_port", guest: 1337, host: 1337 #jarvis

  config.vm.synced_folder ".", "/var/www/html", type: "rsync",
    rsync__exclude: [".idea", ".git/", "vendor/", "var/cache", "var/logs" "web/.htaccess", "web/bundles", "web/css", "web/js", "node_modules", "web/dist"]

  config.vm.hostname = "edfedays"
  config.vm.provider "virtualbox" do |vb|
    vb.memory = "129472"
    vb.cpus = "4"
  end
end

Thank you in advance !!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0