Home  >  Article  >  Web Front-end  >  What should I do if some map files appear in Vue packaging?

What should I do if some map files appear in Vue packaging?

小云云
小云云Original
2018-02-22 15:48:181480browse

Question: Many people may be packaging vue projects. After packaging, some map files will be automatically generated in js. So how do we remove them?

1, run cnpm run build to start packaging

2, the dist directory will be automatically created in the project directory, and the packaged files will be in it

Solution: Go to src/config/index.js and change a parameter:

productionSourceMap:false

Change this is false. Otherwise, some map files will appear in the final packaged file. The function of the map file is: after the project is packaged, the code is compressed and encrypted. If an error occurs when running, the output error message cannot accurately know where the code reported the error.

With map, you can accurately output which row and column are wrong, just like unencrypted code.

Finally, after building, you will find that some map files are not automatically generated. . .

Related recommendations:

Detailed explanation of Map and commonly used api examples

Detailed explanation of examples of PHP's IMAP receiving emails

Detailed explanation of the usage of $map in ThinkPHP

The above is the detailed content of What should I do if some map files appear in Vue packaging?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn