I'm also having this issue with the below code:
mix.js('resources/assets/bootstrap/js/bootstrap.min.js', 'public/js/app.js')
.sass('resources/assets/sass/application.scss', 'public/css/app.css')
.sourceMaps()
.version();
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi every one! This is my config file
const { mix } = require('laravel-mix');
const webpack = require('webpack');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.webpackConfig({
plugins: [
new webpack.IgnorePlugin(/pusher-js/),
// Make sure that the plugin is after any plugins that add images
new ImageminPlugin({
test: 'img/**',
disable: process.env.NODE_ENV !== 'production', // Disable during development
})
]
});
const JS_VENDOR_DIR = 'public/js/vendor';
const CSS_VENDOR_DIR = 'public/css/vendor';
mix.js('resources/assets/js/app.js', 'public/js')
.extract([
'vue',
'axios',
'lodash',
'vee-validate',
'laravel-echo',
'noty',
'vue-mugen-scroll',
'bootstrap',
'cropperjs'
])
.sass('resources/assets/sass/app.scss', 'public/css')
.copy(
'node_modules/jquery/dist/jquery.min.js',
JS_VENDOR_DIR
)
.copy(
'resources/assets/js/vendor/canvas-to-blob.min.js',
JS_VENDOR_DIR
)
.copy(
'node_modules/cropperjs/dist/cropper.min.css',
CSS_VENDOR_DIR
)
.copy(
'resources/assets/js/vendor/svg-sprites-cache.js',
JS_VENDOR_DIR
)
.copy(
'resources/assets/js/vendor/spin.min.js',
JS_VENDOR_DIR
)
.copy(
'resources/assets/js/pages/maintenance.js',
'public/js'
)
.copy(
'node_modules/webticker/jquery.webticker.min.js',
'public/js'
)
.copy(
'resources/assets/img',
'public/img',
false
)
.sourceMaps();
if (mix.config.inProduction) {
mix.version();
}
What may be the reason?
Please or to participate in this conversation.