Unverified Commit 82ef14c8 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Turbopack: Don't run PostCSS on internal assets (#72579)

Closes PACK-3318
Closes https://github.com/vercel/next.js/issues/71618

This is a good idea in general, and also works around a Tailwind bug
breaking `next/font`:
https://github.com/tailwindlabs/tailwindcss/issues/14951
parent 12273f50
...@@ -332,6 +332,16 @@ pub async fn get_client_module_options_context( ...@@ -332,6 +332,16 @@ pub async fn get_client_module_options_context(
..module_options_context.clone() ..module_options_context.clone()
}; };
let internal_context = ModuleOptionsContext {
ecmascript: EcmascriptOptionsContext {
enable_typescript_transform: Some(TypescriptTransformOptions::default().cell()),
enable_jsx: Some(JsxTransformOptions::default().cell()),
..module_options_context.ecmascript.clone()
},
enable_postcss_transform: None,
..module_options_context.clone()
};
let module_options_context = ModuleOptionsContext { let module_options_context = ModuleOptionsContext {
// We don't need to resolve React Refresh for each module. Instead, // We don't need to resolve React Refresh for each module. Instead,
// we try resolve it once at the root and pass down a context to all // we try resolve it once at the root and pass down a context to all
...@@ -358,20 +368,7 @@ pub async fn get_client_module_options_context( ...@@ -358,20 +368,7 @@ pub async fn get_client_module_options_context(
foreign_code_context_condition(next_config, project_path).await?, foreign_code_context_condition(next_config, project_path).await?,
foreign_codes_options_context.cell(), foreign_codes_options_context.cell(),
), ),
( (internal_assets_conditions(), internal_context.cell()),
internal_assets_conditions(),
ModuleOptionsContext {
ecmascript: EcmascriptOptionsContext {
enable_typescript_transform: Some(
TypescriptTransformOptions::default().cell(),
),
enable_jsx: Some(JsxTransformOptions::default().cell()),
..module_options_context.ecmascript.clone()
},
..module_options_context.clone()
}
.cell(),
),
], ],
module_rules: next_client_rules, module_rules: next_client_rules,
..module_options_context ..module_options_context
......
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