Considering the following Webpack Gulp task, how can this be integrated with Gulp in such a way that after compiling Webpack pipes the files to Gulp so that I can run further tasks?
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 );
});
现在有一个Gulp插件允许更深入地集成Webpack和Gulp: https : //github.com/shama/webpack-stream
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.