Skip to content

Commit

Permalink
disable default features for turbopack-ecmascript-plugins (vercel/tur…
Browse files Browse the repository at this point in the history
…borepo#5363)

### Description

it breaks no-plugin in next.js
  • Loading branch information
sokra authored Jun 22, 2023
1 parent 024f706 commit c06f012
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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 c06f012

Please sign in to comment.