Commit 22545a6
committed
feat: remove unused assets css in dist
When one imports an asset (let's say .svg) using import.meta.glob(..., {
eager: true, import: 'default' }) new path will be inlined in a const
and then this const get's tree-shaked/optimized, corresponding asset is
not excluded from the final build.
It's expected that no unused assets, especially heavy ones like fonts
and images, are not included in final build.
Fix: #19949
Ref: https://github.com/BerkliumBirb/vite-broken-tree-shaking1 parent a679a64 commit 22545a6
1 file changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| |||
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
260 | 279 | | |
261 | 280 | | |
262 | 281 | | |
| |||
0 commit comments