Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: splitChunks.enforce, pass more webpack-tests #4353

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions crates/rspack_binding_options/src/options/raw_split_chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ impl From<RawSplitChunksOptions> for new_split_chunks_plugin::PluginOptions {
&overall_max_initial_size
});

let min_chunks = v
.min_chunks
.unwrap_or(if enforce { 1 } else { overall_min_chunks });
let min_chunks = if enforce {
1
} else {
v.min_chunks.unwrap_or(overall_min_chunks)
};

let r#type = v
.r#type
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = () => "https://github.com/web-infra-dev/rspack/issues/3562"
module.exports = () => 'block: https://github.com/web-infra-dev/rspack/issues/3562'

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var HotModuleReplacementPlugin =
require("../../../../").HotModuleReplacementPlugin;
require("@rspack/core").HotModuleReplacementPlugin;
/** @type {import("@rspack/core").Configuration} */
module.exports = {
entry: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = () => {return false}
module.exports = () => 'block: require.main https://github.com/web-infra-dev/rspack/issues/3562'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var HotModuleReplacementPlugin =
require("../../../../").HotModuleReplacementPlugin;
require("@rspack/core").HotModuleReplacementPlugin;
/** @type {import("@rspack/core").Configuration} */
module.exports = {
entry: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = () => "https://github.com/web-infra-dev/rspack/issues/3562"
module.exports = () => 'block: require.main https://github.com/web-infra-dev/rspack/issues/3562'

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = () => "https://github.com/web-infra-dev/rspack/issues/3564"
module.exports = () => 'block: require.ensure https://github.com/web-infra-dev/rspack/issues/4304'

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = () => "https://github.com/web-infra-dev/rspack/issues/3562"
module.exports = () => 'block: require.main https://github.com/web-infra-dev/rspack/issues/3562'
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = () => {return "`splitChunks.name` doesn't support passing function"}
module.exports = () => 'block: not support function type splitChunks.name https://github.com/web-infra-dev/rspack/issues/4333'
Loading