admin管理员组文章数量:1323731
Considering the following Webpack Gulp task, how can this be integrated with Gulp in such a way that after piling 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 );
});
Considering the following Webpack Gulp task, how can this be integrated with Gulp in such a way that after piling 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 );
});
Share
Improve this question
asked Jun 20, 2014 at 8:21
Luis MartinsLuis Martins
1,4812 gold badges18 silver badges33 bronze badges
1 Answer
Reset to default 8There is now a plugin for Gulp that allows deeper integration of Webpack and Gulp: https://github./shama/webpack-stream
本文标签: javascriptHow to pass Webpack generated files to Gulp streamsStack Overflow
版权声明:本文标题:javascript - How to pass Webpack generated files to Gulp streams - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742120866a2421688.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论