考虑到以下 Webpack Gulp 任务,如何将其与 Gulp 集成,以便在编译 Webpack 后将文件通过管道传输到 Gulp,以便我可以运行更多任务?
gulp.task('webpack', function(callback) {
webpackCompiler.run(function(err, stats) {
if (err) {
throw new plugins.util.PluginError('webpack', err);
}
plugins.util.log('webpack', stats.toString({
colors: true,
}));
callback();
});
});
gulp.task('set-env-dev', function() {
webpackConfig.plugins = [
new webpack.BannerPlugin(info.name + '\n' + info.version + ':' + Date.now() + ' [development build]'),
new ComponentPlugin()
];
webpackCompiler = webpack( webpackConfig );
});