I'm trying to make my first webpack project and I cannot find a way to change the numeric keys, which represent the modules in my output bundle.js, to a descriptive string so it will be easier to trace it in the debugger...
I have tried output.chunkFilename and output.sourceMapFilename without success.
This is how my gulp task looks like:
gulp.task('webpack', function (done) {
webpack({
entry: {
app: paths.src + "/main.js",
vendor: ['react/addons', 'lodash']
},
output: {
path: paths.dist,
filename: "bundle.js",
sourceMapFilename: '[file].js'
},
plugins: [
new webpack.optimize.CommonsChunkPlugin("vendor", 'vendor.bundle.js', Infinity)
]
}, function onWebpackComplete(err, stats) {
if (err) throw new gutil.PluginError("webpack", err);
done();
});
});
Is it even possible? am I using it wrong? Is there a better way?
Thanks!
In your webpack.config.js file add exports.output.pathinfo = true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With