Skip to content

Commit 787ecc0

Browse files
committed
use patch.crates-io for next-taskless
1 parent 6b6a225 commit 787ecc0

File tree

6 files changed

+27
-9
lines changed

6 files changed

+27
-9
lines changed

rspack/.rustfmt.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
max_width = 100
2+
3+
comment_width = 100
4+
wrap_comments = true
5+
6+
tab_spaces = 4
7+
hard_tabs = false
8+
9+
format_strings = true
10+
use_field_init_shorthand = true
11+
12+
imports_granularity = "Crate"
13+
group_imports = "StdExternalCrate"

rspack/crates/binding/Cargo.lock renamed to rspack/Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rspack/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[workspace]
2+
resolver = "2"
3+
4+
members = [
5+
"crates/binding"
6+
]
7+
8+
[patch.crates-io]
9+
next-taskless = { path = "../crates/next-taskless" }

rspack/crates/binding/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ napi-derive = { version = "=3.2.2" }
2626
anyhow = { version = "1.0.95" }
2727
serde_json = { version = "1.0.134" }
2828

29-
next-taskless = { path = "../../../crates/next-taskless" }
29+
next-taskless = { version = "0.0.1" }
3030

3131
# Enable SWC plugin feature for targets that support it
3232
# Skip: wasm32-wasip1-threads, i686-pc-windows-msvc, aarch64-pc-windows-msvc, armv7-linux-androideabi, armv7-unknown-linux-gnueabihf

rspack/crates/binding/src/next_externals_plugin.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,7 @@ impl Plugin for NextExternalsPlugin {
138138
"NextExternalsPlugin"
139139
}
140140

141-
fn apply(
142-
&self,
143-
ctx: &mut ApplyContext<'_>,
144-
options: &CompilerOptions,
145-
) -> rspack_error::Result<()> {
141+
fn apply(&self, ctx: &mut ApplyContext<'_>) -> rspack_error::Result<()> {
146142
let is_client = self.compiler_type == "client";
147143
let is_edge_server = self.compiler_type == "edge-server";
148144

@@ -266,7 +262,7 @@ impl Plugin for NextExternalsPlugin {
266262
.collect::<Vec<_>>()
267263
};
268264

269-
ExternalsPlugin::new(external_type, externals).apply(&mut ctx, options)?;
265+
ExternalsPlugin::new(external_type, externals, false).apply(&mut ctx)?;
270266

271267
Ok(())
272268
}

rspack/crates/binding/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"compilerOptions": {
33
"module": "NodeNext",
44
"allowJs": true,
5-
"strict": true
5+
"strict": true,
6+
"outDir": "dist"
67
}
78
}

0 commit comments

Comments
 (0)