supermanrocky's avatar

Mix babel result in 'require is not defined' error. Please help!

mix.babel(
        [
            'resources/assets/js/app.js',
            'node_modules/layui-layer/layer.js'
        ], 'public/js/app.js'
    )
    .extract(['vue', 'axios'])
    .sass('resources/assets/sass/app.scss', 'public/css')
    .sass('resources/assets/css/lib/layer.css', 'public/css');

I have above code to compile. I get "require is not defined" error. Can anyone tell me why and how can I fix it?

The error occur in this line:

require('./bootstrap.js');

Thanks

0 likes
0 replies

Please or to participate in this conversation.