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: README.md
+44-1
Original file line number
Diff line number
Diff line change
@@ -172,7 +172,50 @@ module.exports = {
172
172
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.
173
173
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.
174
174
175
-
To enable this, pass the `Fiber` class to the `sassOptions.fiber` option:
175
+
We automatically inject the [`fibers`](https://github.com/laverdet/node-fibers) package (setup `sassOptions.fiber`) if is possible (i.e. you need install the [`fibers`](https://github.com/laverdet/node-fibers) package).
176
+
177
+
**package.json**
178
+
179
+
```json
180
+
{
181
+
"devDependencies": {
182
+
"sass-loader": "^7.2.0",
183
+
"sass": "^1.22.10",
184
+
"fibers": "^4.0.1"
185
+
}
186
+
}
187
+
```
188
+
189
+
You can disable automatically inject the [`fibers`](https://github.com/laverdet/node-fibers) package pass the `false` value for the `sassOptions.fiber` option.
190
+
191
+
**webpack.config.js**
192
+
193
+
```js
194
+
module.exports= {
195
+
module: {
196
+
rules: [
197
+
{
198
+
test:/\.s[ac]ss$/i,
199
+
use: [
200
+
'style-loader',
201
+
'css-loader',
202
+
{
203
+
loader:'sass-loader',
204
+
options: {
205
+
implementation:require('sass'),
206
+
sassOptions: {
207
+
fiber:false,
208
+
},
209
+
},
210
+
},
211
+
],
212
+
},
213
+
],
214
+
},
215
+
};
216
+
```
217
+
218
+
Also you can pass own the `fiber` value using this code:
0 commit comments