Skip to content

Commit 8928fb0

Browse files
committed
docs: note that lightningcss minification needs the optional peer
1 parent 00436e1 commit 8928fb0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎docs/content/1.get-started/5.upgrade.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ Font metadata and downloaded font files are now cached in `node_modules/.cache/n
5353

5454
#### Injected `@font-face` rules are minified with lightningcss
5555

56-
Generated `@font-face` declarations were previously minified with esbuild unless you had opted into `css.lightningcss`. They are now always minified with lightningcss, so the exact serialisation of the CSS we inject may differ (for example `local(Font Name)` rather than `local("Font Name")`). This is cosmetic, but it will show up in snapshot tests.
56+
Generated `@font-face` declarations were previously minified with esbuild unless you had opted into `css.lightningcss`. They are now minified with lightningcss, so the exact serialisation of the CSS we inject may differ (for example `local(Font Name)` rather than `local("Font Name")`). This is cosmetic, but it will show up in snapshot tests.
57+
58+
lightningcss is an optional peer dependency, as its native binary is several megabytes. Nuxt v4.5 (with Vite 8) brings this in, but if you are using an earlier version of Nuxt, you will need to install it manually to enable css minification.
59+
60+
```bash [Terminal]
61+
npm install --save-dev lightningcss
62+
```
5763

5864
#### Font failures fail production builds
5965

0 commit comments

Comments
 (0)