Skip to content

Commit 627f55d

Browse files
authoredJan 15, 2024
chore!: minimum supported Node.js version is 18.12.0
1 parent 542c9e4 commit 627f55d

19 files changed

+9125
-20089
lines changed
 

‎.github/workflows/nodejs.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ jobs:
6060
strategy:
6161
matrix:
6262
os: [ubuntu-latest, windows-latest, macos-latest]
63-
node-version: [14.x, 16.x, 18.x, 20.x]
63+
# TODO add 21.x after node-sass gets support
64+
node-version: [18.x, 20.x]
6465
webpack-version: [latest]
6566

6667
runs-on: ${{ matrix.os }}
Has a conversation. Original line has a conversation.
@@ -82,10 +83,6 @@ jobs:
8283
node-version: ${{ matrix.node-version }}
8384
cache: "npm"
8485

85-
- name: Install deps
Has a conversation. Original line has a conversation.
86-
run: npm install node-sass@9.0.0
87-
if: matrix.node-version == '20.x'
88-
8986
- name: Install dependencies
9087
run: npm ci
9188

‎README.md

+1-80
Original file line numberDiff line numberDiff line change
@@ -249,85 +249,6 @@ module.exports = {
249249
};
250250
```
251251

252-
Note that when using `sass` (`Dart Sass`), **synchronous compilation is twice as fast as asynchronous compilation** by default, due to the overhead of asynchronous callbacks.
253-
To avoid this overhead, you can use the [fibers](https://www.npmjs.com/package/fibers) package to call asynchronous importers from the synchronous code path.
254-
255-
We automatically inject the [`fibers`](https://github.com/laverdet/node-fibers) package (setup `sassOptions.fiber`) for `Node.js` less v16.0.0 if is possible (i.e. you need install the [`fibers`](https://github.com/laverdet/node-fibers) package).
256-
257-
> **Warning**
258-
>
259-
> Fibers is not compatible with `Node.js` v16.0.0 or later. Unfortunately, v8 commit [dacc2fee0f](https://github.com/v8/v8/commit/dacc2fee0f815823782a7e432c79c2a7767a4765) is a breaking change and workarounds are non-trivial. ([see introduction to readme](https://github.com/laverdet/node-fibers)).
260-
261-
**package.json**
262-
263-
```json
264-
{
265-
"devDependencies": {
266-
"sass-loader": "^7.2.0",
267-
"sass": "^1.22.10",
268-
"fibers": "^4.0.1"
269-
}
270-
}
271-
```
272-
273-
You can disable automatically injecting the [`fibers`](https://github.com/laverdet/node-fibers) package by passing a `false` value for the `sassOptions.fiber` option.
274-
275-
**webpack.config.js**
276-
277-
```js
278-
module.exports = {
279-
module: {
280-
rules: [
281-
{
282-
test: /\.s[ac]ss$/i,
283-
use: [
284-
"style-loader",
285-
"css-loader",
286-
{
287-
loader: "sass-loader",
288-
options: {
289-
implementation: require("sass"),
290-
sassOptions: {
291-
fiber: false,
292-
},
293-
},
294-
},
295-
],
296-
},
297-
],
298-
},
299-
};
300-
```
301-
302-
You can also pass the `fiber` value using this code:
303-
304-
**webpack.config.js**
305-
306-
```js
307-
module.exports = {
308-
module: {
309-
rules: [
310-
{
311-
test: /\.s[ac]ss$/i,
312-
use: [
313-
"style-loader",
314-
"css-loader",
315-
{
316-
loader: "sass-loader",
317-
options: {
318-
implementation: require("sass"),
319-
sassOptions: {
320-
fiber: require("fibers"),
321-
},
322-
},
323-
},
324-
],
325-
},
326-
],
327-
},
328-
};
329-
```
330-
331252
### `sassOptions`
332253

333254
Type:
@@ -338,7 +259,7 @@ type sassOptions =
338259
| ((
339260
content: string | Buffer,
340261
loaderContext: LoaderContext,
341-
meta: any
262+
meta: any,
342263
) => import("sass").LegacyOptions<"async">);
343264
```
344265

‎babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = (api) => {
1010
"@babel/preset-env",
1111
{
1212
targets: {
13-
node: "14.15.0",
13+
node: "18.12.0",
Has conversations. Original line has conversations.
1414
},
1515
},
1616
],

0 commit comments

Comments
 (0)
Please sign in to comment.