How can I disable source maps in production for a vue.js app?
You make changes to the internal webpack config with the vue.config.js
file at the project root (you may need to create it manually).
There is a productionSourceMap
option so you can disable source maps when building for production:
module.exports = {
productionSourceMap: false
};
like @yuriy636 's answer, if you want only for production :
module.exports = {
productionSourceMap: process.env.NODE_ENV != 'production'
};