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!
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!
Share Improve this question asked Aug 7, 2015 at 13:11 Amit KaspiAmit Kaspi 8452 gold badges10 silver badges19 bronze badges1 Answer
Reset to default 7In your webpack.config.js file add exports.output.pathinfo = true