考虑到以下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 ); });
Luis Martins.. 8
现在有一个Gulp插件允许更深入地集成Webpack和Gulp:https: //github.com/shama/webpack-stream
现在有一个Gulp插件允许更深入地集成Webpack和Gulp:https: //github.com/shama/webpack-stream