Open taketo1113 opened 2 months ago
It have workaround to use legacy api of sass-loader option.
If use legacy api of sass-loader, add following settings in webpack config.
module.exports = {
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
"style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
api: "legacy",
// Your options
},
},
],
},
],
},
};
When use webpack/sass-loader of modern Sass JS API, it raise build error with can't find a scss path of bootstrap package.
Steps to reproduce:
The following seems to fix the issue in webpack/sass-loader:
https://github.com/apalfrey/select2-bootstrap-5-theme/blob/ab448b2ac36a6f7f90b162e384ca2b1469a3cc1f/src/select2-bootstrap-5-theme.scss#L5-L7