gulp.task('scripts', function() {
return gulp.src('src/entry.js')
.pipe(webpack({
entry: {
search: './public/scripts/search/search.js',
login:'./public/scripts/login/login.js'
},
output: {
path: '/dist/scripts',
filename: '[name].js',
chunkFilename: '[name].js'
}
}))
.pipe(gulp.dest('dist/scripts/'));
});
publc里的scripts里有对应的文件夹里的js,webpack打包后,想输入到dist里scripts对应的文件夹里的,
目前只能直接输入到dist里到scripts里,没有到scripts对应到文件夹里,如何操作?
慕盖茨4494581
相关分类