Я работаю над более старым проектом, который мы не перенесли в последнюю версию Webpack (версия 2.7.0 с dev server 2.11.2) Я пытаюсь заставить Dart Sass работать с ним, поскольку Node Sass вызывает у меня серьезные проблемы с OS X Catalina.
Вот мой веб-пакет. js:
const { join } = require('path');
const ExtractText = require('extract-text-webpack-plugin');
const { isProd, plugins } = require('./setup');
const babel = require('./babel');
const Fiber = require('fibers');
const out = join(__dirname, '../dist');
const exclude = /(node_modules|bower_components)/;
if (isProd) {
babel.presets.push('babili');
}
module.exports = {
entry: {
app: './src/index.js',
vendor: [
'whatwg-fetch',
'inferno',
'inferno-component',
'wysiwyg.js'
]
},
node: {
fs: 'empty'
},
output: {
path: out,
filename: '[name].[hash].js'
},
module: {
rules: [{
test: /\.jsx?$/,
exclude: exclude,
loader: 'babel-loader',
options: babel
}, {
test: /\.(sass|scss)$/,
use: [{
loader: "style-loader"
}, {
loader: "css-loader"
}, {
loader: "sass-loader",
options: {
implementation: require("sass"),
fiber: Fiber
}
}]
}]
},
plugins: plugins,
devtool: !isProd && 'eval',
devServer: {
headers: {
'Access-Control-Allow-Origin': '*'
},
contentBase: out,
port: process.env.PORT || 3002,
historyApiFallback: true,
compress: isProd,
inline: !isProd,
hot: !isProd
}
};
Вот ошибка Я получаю:
![enter image description here](https://i.stack.imgur.com/4pJZI.png)
Я даже не имею в виду Node Sass, и он все еще пытается его использовать. Я указал переопределение реализации, как указано в документе.