Replies: 2 comments 3 replies
-
This all depends on how the build tooling handles the css. It's not something we can solve in i.e. with webpack/css-loader that should.be possible. |
Beta Was this translation helpful? Give feedback.
-
@LinusBorg Thank you for your reply. I agreed that the build tool should handle this. But as I understand |
Beta Was this translation helpful? Give feedback.
-
Let's say we lazyloaded component
A.vue
in the vue router. That component will be split into 2 chunks on the production buildA.xxx.js
andA.xxx.css
. There is a good chance that the size of these chunks is very small and it will take up an additional request and some RTT to fetch a tiny file.The idea here is to add an option to merge
A.xxx.js
andA.xxx.css
into one fileA.xxx.js
. TheA.xxx.js
will be responsible for adding CSS to HTML when it is called. We still keep the benefit of lazy load modules and save an additional request and some RTT. It will speed up our applicationThe trade-off so far I can think about is we need to build some function to add the CSS on SSR to prevent FOUC
Beta Was this translation helpful? Give feedback.
All reactions