Laravel-mix doesn't update theme



  • I'm trying to develop my theme using the default Theme scaffold with browsreSync enabled the following are my configs

    let mix = require('laravel-mix').mix;
    const WebpackShellPlugin = require('webpack-shell-plugin');
    const themeInfo = require('./theme.json');
    mix.browserSync(
    {
        proxy             : "http://dohlapse.test",
        logPrefix        : "Laravel Eixir BrowserSync",
        logConnections    : false,
        reloadOnRestart : true,
        files: [
               'public/**/*',
               'Themes/Dohlapse/**/*',
               'resources/views/**/*',
        ],
        notify: {
            styles: {
                top: 'auto',
                bottom: '0'
            }
        },
    });
    /**
     * Compile Sass
     */
    mix.sass('resources/scss/main.scss', 'assets/css/main.css').styles([
            'node_modules/bootstrap/dist/css/bootstrap.css',
            'node_modules/slick-carousel/slick/slick.css',
            'resources/assets/css/menu.css',
            'resources/assets/css/style.css',
            'resources/assets/css/responsive.css',
        ], 'assets/css/all.css', __dirname);
    
    /**
     * Concat scripts
     */
    mix.scripts([
      'node_modules/jquery/dist/jquery.js',
      'node_modules/bootstrap/dist/js/bootstrap.js',
      'node_modules/slick-carousel/slick/slick.js',
      'resources/assets/js/flaunt.js',
      'resources/assets/js/main.js'
    ], 'assets/js/all.js');
    
    /**
     * Copy Font directory https://laravel.com/docs/5.4/mix#url-processing
     */
    // mix.copy(
    //   'fonts',
    //   '../../public/fonts'
    // );
    
    /**
     * Publishing the assets
     */
    mix.webpackConfig({
      plugins: [
        new WebpackShellPlugin({onBuildEnd:['php ../../artisan stylist:publish ' + themeInfo.name]})
        // ,new BrowserSyncPlugin(
        //   // BrowserSync options
        //   {
        //     host: 'localhost',
        //     port: 3000,
        //     proxy: 'http://dohlapse.test'
        //   },
        //   // plugin options
        //   {
        //     // prevent BrowserSync from reloading the page
        //     // and let Webpack Dev Server take care of this
        //     reload: false
        //   }
        // )
      ]
    });
    

    and

    "scripts": {
        "dev": "yarn run development",
        "development": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --debug --devtool eval-cheap-module-source-map --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch-poll": "yarn run watch -- --watch-poll",
        "hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --watch --progress --debug --devtool eval-cheap-module-source-map --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "yarn run production",
        "production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
      },
    

    on running npm run watch-poll the project is compiled and published but subsequent changes are not...... I'm running this in laravel's scotchbox homestead. Has anyone else encountered this issue?


Log in to reply
 

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.