š Vite compiler doesn't extract valid classes, even ones rightfully tagged as potential
See original GitHub issueWhat happened?
Upon server start, with debug activated, a lot of the classes Iām using are tagged as potential, but then not considered valid nor included in master.css
.
As you can see in the log, even basic and valid classes like w:100%
, t:center
, f:12
etc arenāt applied.
This goes on for every pages or components, the resulting mater.css only have 15 compiled classes.
Then, when I save a page (or component) in VSCode, while the server is running, the HMR updates the page, and there, the styles are taken into account (without further debug infos)
Regarding MasterCssVitePlugin ,I get find the previously existing option to select here the outputed master.css should go, and itās now outputted inside my node_modules/.vite
folder, while using pnpm.
Its also seems that the latest beta 95 dosnāt include the types definitions for the compiler.
Version
v2.0.0 beta 95 w/ Sveltekit 1.0.1
Relevant log output
ā import master.css.js configuration
15:26:29 [extract] 1 potential src/app.html
15:26:29 [extract] contents
15:26:29 [compile] 1 valid in 0.49ms (1 rules)
15:26:29 [compile] contents
15:26:29 [extract] 23 potential src/routes/+page.svelte
15:26:29 [extract] onMount(() grid-row:1/2 flex flex:col gabX:full w:100% aspect:16/9 obj:cover gabX:col bg:var(--code-background-color) p:20 sticky top:0 z:10 {p:1.5em;flex-basis:full;fg:white;text-decoration:none}>a t:center ai:center jc:center f:12 flex:row fg:white text-decoration:none:hover bg:var(--primary)
15:26:29 [compile] 4 valid in 9.03ms (5 rules)
15:26:29 [compile] contents flex flex:col sticky flex:row
...
What browsers are you seeing the problem on?
Firefox, Chrome, Safari, Microsoft Edge
Issue Analytics
- State:
- Created 9 months ago
- Comments:12 (7 by maintainers)
Top GitHub Comments
Yeah ! Awesome ! Just tested and itās working as intented ! I feel dumb as I donāt remember from where I copied this starter fileā¦
Thanks a lot Aron ā¤ļø
@AristideBH I found the problem. To remove this line: https://github.com/AristideBH/noise-fr/blob/master/master.css.js#L130 Arrays are now overwritten rather than extended.