[英]How to pass Webpack generated files to Gulp streams
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? 考虑到以下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 );
});
现在有一个Gulp插件允许更深入地集成Webpack和Gulp: https : //github.com/shama/webpack-stream
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.