Skip to content

Commit

Permalink
refactor: css-module should have strict buildInfo (#8342)
Browse files Browse the repository at this point in the history
  • Loading branch information
JSerFeng authored Nov 5, 2024
1 parent d11a025 commit 666d40a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/rspack_plugin_extract_css/src/css_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ impl Module for CssModule {
build_info: BuildInfo {
hash: Some(self.compute_hash(&build_context.compiler_options)),
cacheable: self.cacheable,
strict: true,
file_dependencies: self.file_dependencies.clone(),
context_dependencies: self.context_dependencies.clone(),
missing_dependencies: self.missing_dependencies.clone(),
Expand Down
1 change: 1 addition & 0 deletions crates/rspack_plugin_extract_css/src/parser_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ impl JavascriptParserPlugin for PluginCssExtractParserPlugin {
)
.collect::<Vec<_>>();
self.cache.insert(data_str.clone(), deps.clone());
parser.build_info.strict = true;
deps
} else {
vec![]
Expand Down

2 comments on commit 666d40a

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs ❌ failure
_selftest ✅ success
rspress ✅ success
rslib ✅ success
rsbuild ❌ failure
examples ❌ failure
devserver ✅ success

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-11-05 9c56263) Current Change
10000_big_production-mode + exec 43.9 s ± 638 ms 44.1 s ± 907 ms +0.49 %
10000_development-mode + exec 1.83 s ± 22 ms 1.83 s ± 13 ms +0.11 %
10000_development-mode_hmr + exec 644 ms ± 4.4 ms 645 ms ± 7.2 ms +0.08 %
10000_production-mode + exec 2.41 s ± 19 ms 2.43 s ± 47 ms +1.01 %
arco-pro_development-mode + exec 1.75 s ± 55 ms 1.78 s ± 63 ms +2.11 %
arco-pro_development-mode_hmr + exec 430 ms ± 1.5 ms 430 ms ± 0.63 ms -0.00 %
arco-pro_production-mode + exec 3.21 s ± 75 ms 3.2 s ± 83 ms -0.32 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 3.24 s ± 57 ms 3.27 s ± 74 ms +1.06 %
threejs_development-mode_10x + exec 1.58 s ± 7.7 ms 1.6 s ± 17 ms +1.09 %
threejs_development-mode_10x_hmr + exec 771 ms ± 19 ms 774 ms ± 2.4 ms +0.37 %
threejs_production-mode_10x + exec 4.95 s ± 27 ms 4.96 s ± 19 ms +0.19 %

Please sign in to comment.