Joke Collection Website - Joke collection - How to view the component dependency tree when building a project with vue-cli
How to view the component dependency tree when building a project with vue-cli
When I think of webpack, I think of a giant who seems to have just woken up from Stonehenge's Gobekli. He is strong, but he is also fat.
Without any optimization, look at the file size after construction.
The average entrance size is over 400 k, which is unbearable ..................................................................................................................................................................
If you leak it here, everyone will laugh at you ... although it is ...
Time seems to have bitten me, and I went back to those years when I used maven. I remember myeclipse has a maven2 plugin-it can display the dependency tree of the current reference jar package.
So the next step is to know how the project is packaged and what it depends on. Nothing is more enjoyable than visualizing the dependency tree. ...
After some Google work, I finally found three artifacts that can be combined with vue-cli to output and build reports.
Put it in the plug-in configuration item of wepback.prod.js
However ... I used vue-cli, which was built as an independent module building operation.
Webpack.base.js webpack.prod.js is built-in, so it will be used.
Stats-web pack- plugin
After configuring the plug-in, run the build process once. If the file path is not added, stats.json will be output to the build output directory together with all your packaged files ~ ~
Take my project as an example, it is as big as 16m. ...
If you are interested, you can double-click to open it. ...
As you can see, I shamefully used the urban scavengers in Sui Dynasty ............................................................................................................................................................. ...
Ok ... after a hard week's work, I will have a massage at home. ...
With the help of analysis tools, let's see which points need to be optimized (those points that suddenly appear in your mind)
The following is my vendor package, that is, the package of the third-party module, which is as big as 600k K K. It is definitely a burden.
You can see the third-party libraries and generic classes I use here.
Corresponding solutions:
If you can do cdn, dump cdn.
If you can write it yourself, just write it yourself.
What is wasted is either finding a lighter substitute, changing other schemes, or writing it yourself (such as date processing).
20 16.6. 14 more
Current progress
To be continued ... the next goal is to kill jquery and sm ~
- Previous article:How can I not care what others think of me?
- Next article:Is there anything particular about posting Spring Festival couplets?
- Related articles
- Who has some jokes to tell me? I¡¯m so depressed.
- What will happen if the college entrance examination volunteers do not obey the adjustment?
- Nan huaijin: Why are you heavy, tired and listless?
- What jokes can the tour guide tell, what stories can he tell, what songs can he sing during the tour, and what songs are suitable for the general public. The website is also available, I am a male to
- Open the photo in the joke.
- Han Fuqu¡¯s character
- Father Brown's ninth season stills. I have my own resources. Hd is free. Thank you! !
- I once said that I would assassinate US President Trump. What kind of "hatred" do Depp and Trump have?
- Why do Chu people make jokes and get into trouble in Chu people's Invisible?
- Tell me the lyrics of my hometown Wanrong County.