Skip to content

Commit b687db9

Browse files
committed
feat(html): improve template parameters
1 parent 8b864ff commit b687db9

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

Cargo.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ rayon = { version = "1.10.0" }
4949
regex = { version = "1.10.4" }
5050
rspack_sources = { version = "=0.2.17" }
5151
rustc-hash = { version = "1.1.0" }
52-
schemars = { version = "0.8.16" }
5352
serde = { version = "1.0.197" }
5453
serde_json = { version = "1.0.115" }
5554
simd-json = { version = "0.14.0-rc.2" }

crates/rspack_plugin_html/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ repository = "https://github.com/web-infra-dev/rspack"
77
version = "0.1.0"
88
[features]
99
default = []
10-
testing = ["dep:schemars"]
1110

1211
[dependencies]
1312
anyhow = { workspace = true }
@@ -22,7 +21,6 @@ rspack_error = { version = "0.1.0", path = "../rspack_error" }
2221
rspack_hook = { version = "0.1.0", path = "../rspack_hook" }
2322
rspack_paths = { version = "0.1.0", path = "../rspack_paths" }
2423
rspack_util = { version = "0.1.0", path = "../rspack_util" }
25-
schemars = { workspace = true, optional = true }
2624
serde = { workspace = true, features = ["derive"] }
2725
serde_json = { workspace = true }
2826
sha2 = "0.10.8"

crates/rspack_plugin_html/src/plugin.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ async fn process_assets(&self, compilation: &mut Compilation) -> Result<()> {
9696
}
9797
}
9898
} else {
99-
let defualt_src_template =
99+
let default_src_template =
100100
path_clean::clean(compilation.options.context.as_path().join("src/index.ejs")).assert_utf8();
101101

102-
if let Ok(content) = fs::read_to_string(&defualt_src_template) {
103-
let url = defualt_src_template.as_str().to_string();
102+
if let Ok(content) = fs::read_to_string(&default_src_template) {
103+
let url = default_src_template.as_str().to_string();
104104
compilation
105105
.file_dependencies
106-
.insert(defualt_src_template.into_std_path_buf());
106+
.insert(default_src_template.into_std_path_buf());
107107

108108
(content, url, "src/index.ejs".to_string())
109109
} else {

0 commit comments

Comments
 (0)