reference RuntimeGlobal require #17134
Analysis complete
Summary
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.
Walkthrough
- Import
RuntimeGlobals
module to access constants for global variable names (link) - Replace hard-coded
"__webpack_require__"
strings withRuntimeGlobals.require
constant in hooks and expressions that match the webpack runtime function (link, link, link)
Poem
No more hard-coded strings of doom
We useRuntimeGlobals
to consume
The webpack variables of power and might
We make our code more dynamic and bright
Emoji
🔧🌐🧹
Include these descriptions in your pull request description by including the following marker tags:
copilot:all
: all the content, in one gocopilot:summary
: a one paragraph summary of the code changescopilot:walkthrough
: a step by step walkthrough of the code changescopilot:poem
: a poem about the code changes!copilot:emoji
: three emoji that capture the changes
Feedback is welcome. Simply add a comment to this PR of the form /copilot feedback [your comments here]
.
Details
Copilot for PRs is a limited technical preview from GitHub Next.
It's aim is to make it easier to write pull request descriptions by providing automatically generated suggestions based on the code changes.
To find out more go to https://githubnext.com/projects/copilot-for-pull-requests or come and chat with us on Discord
File | Status | Duration |
---|---|---|
Summary & Walkthrough | ✅ Finished | 16.3 seconds |
lib/CompatibilityPlugin.js | ✅ Finished | 8.9 seconds |
lib/DefinePlugin.js | ✅ Finished | 7.3 seconds |