Unverified Commit 7b8bf6ee authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

fix(turbo): sassOptions `silenceDeprecations` was not overwritten with user options (#73937)

### Why?

The user's `silenceDeprecations` option was not overwritten in
turbopack, only the `legacy-js-api` was passed.

Thanks to @mzronek for reporting at
https://github.com/vercel/next.js/issues/71638#issuecomment-2539967913!
Co-authored-by: 's avatarDonny/강동윤 <kdy1997.dev@gmail.com>
parent a0260b31
...@@ -16,10 +16,13 @@ pub async fn maybe_add_sass_loader( ...@@ -16,10 +16,13 @@ pub async fn maybe_add_sass_loader(
bail!("sass_options must be an object"); bail!("sass_options must be an object");
}; };
// TODO: Remove this once we upgrade to sass-loader 16 // TODO: Remove this once we upgrade to sass-loader 16
sass_options.insert( let silence_deprecations = if let Some(v) = sass_options.get("silenceDeprecations") {
"silenceDeprecations".into(), v.clone()
serde_json::json!(["legacy-js-api"]), } else {
); serde_json::json!(["legacy-js-api"])
};
sass_options.insert("silenceDeprecations".into(), silence_deprecations);
let mut rules = if let Some(webpack_rules) = webpack_rules { let mut rules = if let Some(webpack_rules) = webpack_rules {
webpack_rules.await?.clone_value() webpack_rules.await?.clone_value()
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment