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

reference RuntimeGlobal require #17134

Conversation

dev-cj
Copy link

@dev-cj dev-cj commented May 4, 2023

Summary

This helps address issue #16897

🤖 Generated by Copilot at abdbe25

This pull request refactors the CompatibilityPlugin and the DefinePlugin to use the RuntimeGlobals module for accessing the webpack runtime variables. This reduces code duplication and improves consistency and flexibility.

Details

In PR is only replacing exactly __webpack_require__ string literals

🤖 Generated by Copilot at abdbe25

  • Import RuntimeGlobals module to access constants for global variable names (link)
  • Replace hard-coded "__webpack_require__" strings with RuntimeGlobals.require constant in hooks and expressions that match the webpack runtime function (link, link, link)

@linux-foundation-easycla
Copy link

CLA Not Signed

@webpack-bot
Copy link
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants