const webpackStream = require('webpack-stream'); // version ^7.0.0
const named = require('vinyl-named'); // version ^1.1.0
const { src, dest } = require('gulp'); // version ^4.0.2
const webPack = () => {
return src(`${paths.scripts.src}/main.js`)
.pipe(named())
.pipe(webpackStream(require('../webpack.config.js')))
.pipe(dest(`${paths.scripts.dest}`));
}
Errors
Error in plugin "webpack-stream"
Message:
Module not found: Error: Can't resolve 'Swiper/swiper' in '/..../src/js/test'
Module not found: Error: Can't resolve 'Bootstrap/popover' in '/..../src/js/test'
Closing this since the issue was in the webpack.config generated from npx, which had additional logic for isProduction and such.
Just exported config directly and that solved the issue.
Issue with webpack-stream not resolving aliases in webpack.config.js. I should mention that I'm using Gulp alongside web pack-stream.
Part of webpack.config.js:
Gulp Task:
Errors