Search code examples
vue.jswebpackvuetify.jsvue-cli

vue-cli: why do I see non-minificated javascript code in Devtools after npm run build?


I have a Vue-cli project with Vuetify. After "npm run build" command files in Dist folders looks like minified files. But after publishing I can see non-minified code in Chrome devtools. What is missed?


Solution

  • On your dist folder the files are combined minifided to make delivering them from the server more efficient.

    Next to this files you will see a *.map file. This is the source map. This is a file that maps from the transformed source to the original source, enabling the browser to reconstruct the original source and present the reconstructed original in the debugger (in your example Chrome Dev Tools).

    You can turn off this option as explained in the vue-cli docs default is set to true

    Using a source map