Skip to content

Commit 6318d50

Browse files
authored
Fix global SCSS on Node.js <= 14 (vercel#50185)
Fixes vercel#45052. See the comments and related issue thread.
1 parent 0539b9c commit 6318d50

File tree

1 file changed

+11
-1
lines changed
  • packages/next/src/build/webpack/config/blocks/css

1 file changed

+11
-1
lines changed

packages/next/src/build/webpack/config/blocks/css/index.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,17 @@ export const css = curry(async function css(
158158
// Source maps are required so that `resolve-url-loader` can locate
159159
// files original to their source directory.
160160
sourceMap: true,
161-
sassOptions,
161+
sassOptions: {
162+
// The "fibers" option is not needed for Node.js 16+, but it's causing
163+
// problems for Node.js <= 14 users as you'll have to manually install
164+
// the `fibers` package:
165+
// https://github.com/webpack-contrib/sass-loader#:~:text=We%20automatically%20inject%20the%20fibers%20package
166+
// https://github.com/vercel/next.js/issues/45052
167+
// Since it's optional and not required, we'll disable it by default
168+
// to avoid the confusion.
169+
fibers: false,
170+
...sassOptions,
171+
},
162172
additionalData: sassPrependData || sassAdditionalData,
163173
},
164174
},

0 commit comments

Comments
 (0)