PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, October 16, 2022

[FIXED] How can I disable source maps in production for a vue.js app?

 October 16, 2022     vue.js, webpack     No comments   

Issue

My app is created with the vue cli. I can't find any option to disable source maps in production. The npm build step in my package.json looks like this:

"build": "vue-cli-service build",

In angular, i can just add --prod to my build step to make it work. Is there any such option for vue.js? Or do I have to change the webpack config (which is hidden by the cli)?


Solution

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
};


Answered By - yuriy636
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing