Skip to content

Commit

Permalink
disable default features for turbopack-ecmascript-plugins (#5363)
Browse files Browse the repository at this point in the history
### Description

it breaks no-plugin in next.js
  • Loading branch information
sokra authored Jun 22, 2023
1 parent c0b4514 commit 08aba99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ turbopack-css = { path = "crates/turbopack-css" }
turbopack-dev = { path = "crates/turbopack-dev" }
turbopack-dev-server = { path = "crates/turbopack-dev-server" }
turbopack-ecmascript = { path = "crates/turbopack-ecmascript" }
turbopack-ecmascript-plugins = { path = "crates/turbopack-ecmascript-plugins" }
turbopack-ecmascript-plugins = { path = "crates/turbopack-ecmascript-plugins", default-features = false }
turbopack-ecmascript-runtime = { path = "crates/turbopack-ecmascript-runtime" }
turbopack-env = { path = "crates/turbopack-env" }
turbopack-image = { path = "crates/turbopack-image" }
Expand Down
2 changes: 1 addition & 1 deletion crates/turbopack-binding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ turbopack-css = { optional = true, workspace = true }
turbopack-dev = { optional = true, workspace = true }
turbopack-dev-server = { optional = true, workspace = true }
turbopack-ecmascript = { optional = true, workspace = true }
turbopack-ecmascript-plugins = { optional = true, workspace = true }
turbopack-ecmascript-plugins = { optional = true, workspace = true, default-features = false }
turbopack-ecmascript-runtime = { optional = true, workspace = true }
turbopack-env = { optional = true, workspace = true }
turbopack-image = { optional = true, workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ impl SwcPluginModule {

#[cfg(not(feature = "swc_ecma_transform_plugin"))]
{
let _ = plugin_name;
let _ = plugin_bytes;
Self(())
}
}
Expand Down Expand Up @@ -105,6 +107,7 @@ impl SwcEcmaTransformPluginsTransformer {
// [TODO] Due to WEB-1102 putting this module itself behind compile time feature
// doesn't work. Instead allow to instantiate dummy instance.
#[cfg(not(feature = "swc_ecma_transform_plugin"))]
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
Self {}
}
Expand Down

0 comments on commit 08aba99

Please sign in to comment.