Skip to content

Commit

Permalink
fix: disabled fibers for node 16
Browse files Browse the repository at this point in the history
  • Loading branch information
tj-kev committed Dec 20, 2021
1 parent 2375c53 commit b8c1abc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion configs/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ module.exports = function ({ dev, isServer }) {
loader: MiniCssExtractPlugin.loader,
};

const sassOptionFiber = false;

// Check if we can enable fibers or not. Its not supported in node versions 16 and up.
if (parseInt(process.versions.node.split('.')[0]) < 16) {
sassOptionFiber = require("fibers");
}

const sassLoader = {
loader: "sass-loader",
options: {
implementation: require("sass"),
sassOptions: {
fiber: require("fibers"),
fiber: sassOptionFiber
},
},
};
Expand Down

0 comments on commit b8c1abc

Please sign in to comment.