Skip to content

Commit

Permalink
backport: fix(turbo): sassOptions silenceDeprecations was not overwri…
Browse files Browse the repository at this point in the history
…tten with user options (#74005)

Backports:
- #73937

Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
  • Loading branch information
3 people authored Dec 17, 2024
1 parent 0c8187a commit d27bb14
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/next-core/src/next_shared/webpack_rules/sass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ pub async fn maybe_add_sass_loader(
bail!("sass_options must be an object");
};
// TODO: Remove this once we upgrade to sass-loader 16
sass_options.insert(
"silenceDeprecations".into(),
serde_json::json!(["legacy-js-api"]),
);
let silence_deprecations = if let Some(v) = sass_options.get("silenceDeprecations") {
v.clone()
} else {
serde_json::json!(["legacy-js-api"])
};

sass_options.insert("silenceDeprecations".into(), silence_deprecations);
let mut rules = if let Some(webpack_rules) = webpack_rules {
webpack_rules.await?.clone_value()
} else {
Expand Down

0 comments on commit d27bb14

Please sign in to comment.