Skip to content

fix: only render init code when need moduleRemapping#18338

Merged
alexander-akait merged 1 commit intowebpack:mainfrom
fi3ework:reduce-init
Apr 22, 2024
Merged

fix: only render init code when need moduleRemapping#18338
alexander-akait merged 1 commit intowebpack:mainfrom
fi3ework:reduce-init

Conversation

@fi3ework
Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

For ExternalModule, render init code only when needing moduleRemapping, which will reduce useless code. Although the init code could be removed when minimizing, but this will help in some scenario, for example, we are using webpack to building bundleless package without running minimizing, this will help.

Did you add tests for your changes?

No, the test code is not minimized, they should sufficient so far. Feel free to let me what kind of case should be added. :)

Does this PR introduce a breaking change?

No.

What needs to be documented once your changes are merged?

No.

@webpack-bot
Copy link
Copy Markdown
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

@alexander-akait
Copy link
Copy Markdown
Member

Thank you

@alexander-akait alexander-akait merged commit 1542e11 into webpack:main Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Need's Release

Development

Successfully merging this pull request may close these issues.

3 participants