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

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

小云云
Release: 2018-02-22 15:48:18
Original
1525 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template