Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions crates/next-core/src/next_client/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,16 @@ pub async fn get_client_module_options_context(
..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 {
// 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
Expand All @@ -358,20 +368,7 @@ pub async fn get_client_module_options_context(
foreign_code_context_condition(next_config, project_path).await?,
foreign_codes_options_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(),
),
(internal_assets_conditions(), internal_context.cell()),
],
module_rules: next_client_rules,
..module_options_context
Expand Down
Loading