Skip to content

Commit

Permalink
fix(Build): Silence SASS 1.79 deprecation warnings, until this is sol…
Browse files Browse the repository at this point in the history
…ved in Bootstrap upstream.
  • Loading branch information
thet committed Sep 23, 2024
1 parent bbccb0c commit 6bc653a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,25 @@ module.exports = () => {
);
}


// Fix for sass-loader to silence deprecation warnings, mainly from BootstrapJS.
// TODO: Remove this when BootstrapJS is updated.
// See: https://github.com/twbs/bootstrap/pull/40864

const css_loader_rule = config.module.rules.filter(it=>it?.use?.includes?.("sass-loader"));
if (css_loader_rule.length > 0) {
const sass_loader_index = css_loader_rule[0].use.indexOf("sass-loader");
css_loader_rule[0].use[sass_loader_index] = {
loader: "sass-loader",
options: {
sassOptions: {
quietDeps: true,
//silenceDeprecations: ['legacy-js-api'],
},
},
};
}

console.log(JSON.stringify(config, null, 4));

return config;
Expand Down

0 comments on commit 6bc653a

Please sign in to comment.