Debugging 如何在调试模式下使用Webpack 3
我想在调试模式下使用Debugging 如何在调试模式下使用Webpack 3,debugging,webpack,browserify,Debugging,Webpack,Browserify,我想在调试模式下使用webpack3。我的webpack.config文件是: module.exports = { progress: true, watch: true, module: { loaders: [ // JSON { test: /\.json$/, loader: "json-loader" }, // React & ES2015
webpack3
。我的webpack.config文件是:
module.exports = {
progress: true,
watch: true,
module: {
loaders: [
// JSON
{ test: /\.json$/, loader: "json-loader" },
// React & ES2015
{
test: /.jsx?$/,
loader: 'babel-loader',
//exclude: /node_modules/,
query: {
presets: ['react', 'es2015']
},
}
]
},
plugins: [
new webpack.LoaderOptionsPlugin({
debug: true
})
]
}
bundle工作得很好,但是当我在浏览器中按CTRL+p
时(在调试窗口打开一个选中的Source
选项卡),它只显示Index.bundle.js
。过去,我使用braoserify
创建bundle
,使用以下配置,我可以在console source选项卡中看到所有bundle
文件:
browserify({
entries: ['js/index.js'],
transform: [babelify] ,//reactify],
debug: true
})
.bundle()
.on('error', function onError() {
gutil.log(gutil.colors.bgRed(' ! Browserify error: '), arguments);
})
.on('end', function onEnd() {
gutil.log(' > Browserify finished bundling');
})
//.pipe(uglify())
.pipe(source('index-boundle.js'))
.pipe(gulp.dest('js'));
有没有办法使用webpac3
查看brawser控制台中的所有budle
文件