Vue-cli-service build not compiling code?

I have a PWA that I’ve built and when I run vue-cli-service build and then look at what is deployed to Firebase, I can see all the Vue code I’ve written. Sure, the HTML portion is chunked but when I click on Sources in the Chrome dev console (under webpack://), I see everything with the same tab spacing, everything! No obstrusification, compression, any changes. Scary! What can I do about that?

You are seeing your source code in dev console because productionSourceMap is enable by default on vue-cli-service build. You need to set it to false in vue.config.js.
Refer to https://cli.vuejs.org/config/#productionsourcemap

module.exports = {
  productionSourceMap: false
};
1 Like

Thank you sir! You’re a legend. I didn’t even have a config file so I created one. If there is anything else good for production environment let me know please!