Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working) #15

Open
projct1 opened this issue Nov 30, 2020 · 0 comments
Open

Not working) #15

projct1 opened this issue Nov 30, 2020 · 0 comments

Comments

@projct1
Copy link

projct1 commented Nov 30, 2020

Hello.
Tell me please, why my configuration is not working?

webpack.mix.js

let fs = require('fs'),
    mix = require('laravel-mix'),
    srcPath = 'resources/',
    publicPath = 'public_html/assets/',
    pathImg = 'images',
    pathFont = 'fonts';

mix.setPublicPath(publicPath).setResourceRoot('/assets/');

mix.copy(srcPath + pathFont, publicPath + pathFont).copy(srcPath + pathImg, publicPath + pathImg);

fs.readdir(__dirname, (err, files) => {
    files.forEach(file => {
        if (/\.mix\..*\.js/.test(file)) {
            require(__dirname + '/' + file);
        }
    });
});

webpack.mix.offsite.js

let mix = require('laravel-mix'),
    srcPath = 'resources/',
    publicPath = 'public_html/assets/';

mix.js(srcPath + 'js/offsite.js', publicPath + '/js/offsite/app.js')
    .sass(srcPath + 'scss/offsite/app.scss', publicPath + 'css/offsite')
    .extract()
    .version();

My dev command is node node_modules/cross-env/src/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

Result of yarn dev is https://skr.sh/s5OUXkjNXkg (no one of other mix files are not processed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant