Skip to content

Commit

Permalink
Merge 2b90a28 into 3b0089c
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkirsz committed Dec 9, 2022
2 parents 3b0089c + 2b90a28 commit f933c7d
Show file tree
Hide file tree
Showing 120 changed files with 2,041 additions and 703 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ members = [
"crates/next-binding",
"crates/next-core",
"crates/next-dev",
"crates/next-transform-strip-page-exports",
"crates/node-file-trace",
"crates/swc-ast-explorer",
"crates/turbo-malloc",
Expand Down
4 changes: 3 additions & 1 deletion crates/next-core/src/next_client/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ pub async fn add_next_transforms_to_pages(
]),
]),
vec![ModuleRuleEffect::AddEcmascriptTransforms(
EcmascriptInputTransformsVc::cell(vec![EcmascriptInputTransform::NextJsPageSsr]),
EcmascriptInputTransformsVc::cell(vec![
EcmascriptInputTransform::NextJsStripPageDataExports,
]),
)],
));
Ok(module_options_context.cell())
Expand Down
38 changes: 38 additions & 0 deletions crates/next-transform-strip-page-exports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[package]
name = "next-transform-strip-page-exports"
version = "0.1.0"
description = "SWC transform to selectively strip Next.js page data or default exports"
license = "MPL-2.0"
edition = "2021"
autobenches = false

[lib]
bench = false

[dependencies]
fxhash = "0.2.1"
tracing = "0.1.37"

swc_core = { workspace = true, features = [
"ecma_ast",
"common",
"common_concurrent",
"common_sourcemap",
"ecma_codegen",
"ecma_parser",
"ecma_preset_env",
"ecma_transforms",
"ecma_transforms_module",
"ecma_transforms_react",
"ecma_transforms_typescript",
"ecma_quote",
"ecma_visit",
"ecma_visit_path",
"ecma_utils",
"testing",
"base",
] }

[dev-dependencies]
swc_core = { workspace = true, features = ["testing_transform"] }
testing = "0.31.14"
Loading

0 comments on commit f933c7d

Please sign in to comment.