You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/01-app/03-api-reference/05-config/01-next-config-js/sassOptions.mdx
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,4 +43,7 @@ const nextConfig = {
43
43
module.exports= nextConfig
44
44
```
45
45
46
-
> **Good to know:**`sassOptions` are not typed outside of `implementation` because Next.js does not maintain the other possible properties.
46
+
> **Good to know:**
47
+
>
48
+
> -`sassOptions` are not typed outside of `implementation` because Next.js does not maintain the other possible properties.
49
+
> - The `functions` property for defining custom Sass functions is only supported with webpack. When using Turbopack, custom Sass functions are not available because Turbopack's Rust-based architecture cannot directly execute JavaScript functions passed through this option.
|**PostCSS**|**Supported**| Automatically processes `postcss.config.js` in a Node.js worker pool. Useful for Tailwind, Autoprefixer, etc. |
82
-
|**Sass / SCSS**|**Supported** (Next.js) | For Next.js, Sass is supported out of the box. In the future, Turbopack standalone usage will likely require a loader config. |
83
-
|**Less**| Planned via plugins | Not yet supported by default. Will likely require a loader config once custom loaders are stable. |
84
-
|**Lightning CSS**|**In Use**| Handles CSS transformations. Some low-usage CSS Modules features (like `:local/:global` as standalone pseudo-classes) are not yet supported. [See below for more details.](#unsupported-and-unplanned-features)|
|**PostCSS**|**Supported**| Automatically processes `postcss.config.js` in a Node.js worker pool. Useful for Tailwind, Autoprefixer, etc. |
82
+
|**Sass / SCSS**|**Supported** (Next.js) | For Next.js, Sass is supported out of the box. Custom Sass functions (`sassOptions.functions`) are not supported because Turbopack's Rust-based architecture cannot directly execute JavaScript functions, unlike webpack's Node.js environment. Use webpack if you need this feature. In the future, Turbopack standalone usage will likely require a loader config.|
83
+
|**Less**| Planned via plugins | Not yet supported by default. Will likely require a loader config once custom loaders are stable. |
84
+
|**Lightning CSS**|**In Use**| Handles CSS transformations. Some low-usage CSS Modules features (like `:local/:global` as standalone pseudo-classes) are not yet supported. [See below for more details.](#unsupported-and-unplanned-features)|
85
85
86
86
### Assets
87
87
@@ -175,6 +175,8 @@ Some features are not yet implemented or not planned:
175
175
-`:import` and `:export` ICSS rules.
176
176
-`composes` in `.module.css` composing a `.css` file. In webpack this would treat the `.css` file as a CSS Module, with Turbopack the `.css` file will always be global. This means that if you want to use `composes` in a CSS Module, you need to change the `.css` file to a `.module.css` file.
177
177
-`@import` in CSS Modules importing `.css` as a CSS Module. In webpack this would treat the `.css` file as a CSS Module, with Turbopack the `.css` file will always be global. This means that if you want to use `@import` in a CSS Module, you need to change the `.css` file to a `.module.css` file.
178
+
-**`sassOptions.functions`**
179
+
Custom Sass functions defined in `sassOptions.functions` are not supported. This feature allows defining JavaScript functions that can be called from Sass code during compilation. Turbopack's Rust-based architecture cannot directly execute JavaScript functions passed through `sassOptions.functions`, unlike webpack's Node.js-based sass-loader which runs entirely in JavaScript. If you're using custom Sass functions, you'll need to use webpack instead of Turbopack.
178
180
-**`webpack()` configuration** in `next.config.js`
179
181
Turbopack replaces webpack, so `webpack()` configs are not recognized. Use the [`turbopack` config](/docs/app/api-reference/config/next-config-js/turbopack) instead.
Copy file name to clipboardExpand all lines: packages/next/errors.json
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -890,5 +890,6 @@
890
890
"889": "Unknown \\`cacheLife()\\` profile \"%s\" is not configured in next.config.js\\nmodule.exports = {\n cacheLife: {\n\"%s\": ...\\n }\n}",
891
891
"890": "Received an underlying cookies object that does not match either `cookies` or `mutableCookies`",
892
892
"891": "Failed to read build paths file \"%s\": %s",
893
-
"892": "Failed to resolve glob pattern \"%s\": %s"
893
+
"892": "Failed to resolve glob pattern \"%s\": %s",
894
+
"893": "The \"sassOptions.functions\" option is not supported when using Turbopack. Custom Sass functions are only available with webpack. Please remove the \"functions\" property from your sassOptions in %s."
0 commit comments