Closed OkanPinar closed 2 weeks ago
I will work on this when I have the time. However, since Quasar only provides the bundled CSS file, achieving this will be possible only when the user installs the sass
package.
Hi @Maiquu any progress? is there any current workaround?
I don't think this is possible due to how quasar's runtime code is tightly integrated with its style definitions. Quasar concatenates strings with user provided props to build class strings. This will cause tools like PurgeCSS to make incorrect assumptions about what classes are unused. Even if you manage to make it work with PurgeCSS via safelist options, the gain will be minimal.
Only style definitions I can safely remove at module side are the ones belonging to unused components. This can maybe achieved by piggy-backing the rollup's tree-shaking process. But the gain from it may not be too great.
Checks
Environment
Quasar version
2.14.1
Browsers
Firefox
Description
When adding Quasar to the Nuxt project via this extension and using it with ssr mode, the HTML file includes every style definition belonging to Quasar, therefore the size of documents is getting bigger enormously. It can be easily observed from the playground example. Is there any way to get rid of this situation?
Reproduction steps
Screenshots
No response
Logs
No response