Answer the question
In order to leave comments, you need to log in
During the build, a huge 5mb chunk is formed, as it turned out, these are all styled components. How can this be optimized?
During the build, a huge 5mb chunk is formed, as it turned out, these are all styled components. How can this be optimized?
Answer the question
In order to leave comments, you need to log in
How are these "styled components" of yours written, how is the assembly going? Show examples of assembled css
If you point your finger at the sky, you can check:
I don't know how in React, but in Vue you can import your (css, scss, etc.) files into a component and specify the scoped
. Hashes will be attached to classes and each component will duplicate all styles connected to it. And if you import all the styles into each component, then the styles will be duplicated.
It is solved by preprocessors and import into the component not index.scss, but separate files with mixins and variables.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question