Answer the question
In order to leave comments, you need to log in
How to assemble files in webpack?
Good evening.
Is it possible to set parameters in the webpack config to build all js files from different directories into one?
In gulp, we make this as easy as shelling pears. Is there something similar for webpack ?
gulp.task('scripts', function() {
return gulp.src('./assets/js/**/*.js').pipe(concat({
path: 'app.js'
})).pipe(gulp.dest(assets + "js/"));
});
Answer the question
In order to leave comments, you need to log in
node-glob
var glob = require('glob');
var assets = glob.sync('./assets/**/*.js');
module.exports = {
entry: assets,
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question