I'm currently using Webpack, and I've encountered an issue when running a production build with the command:
webpack -p
The build process never seems to finish.
After a bit of searching, I discovered that disabling the sourcemap for uglifyjs could resolve this issue. However, I couldn't find a clear explanation on how to actually disable it.
Ideally, I would like to have the option to disable the sourceMap directly from my configuration settings.
This raised another question in my mind - shouldn't I actually want a source map when creating a production build? Disabling this feature feels like a temporary fix rather than a proper solution.
module.exports = {
entry: ["./utils", "./app.js" ],
output: { filename: "bundle.js" },
module:{
preLoaders:[
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'jshint-loader'
}
],
loaders: [
{
test:/\.es6$/,
exclude: /node_modules/,
loader: "babel",
query: {
presets: ['es2015']
}
}
]
},
resolve: {
extensions: ['', '.js', '.es6']
},
watch: true
}
UPDATE: It appears that setting watch: true
in my config was causing the issue... but I still want to understand how to properly disable source maps.