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
External Modules don't output correctly for 'global' type. #6933
Comments
It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. |
Sorry about that, I didn't delete the issue template. I opened the issue from the github source browser, so it never gave me a template in the first place. I've updated the issue with the fields. |
Yep, that's wrong, send a PR |
This issue had no activity for at least half a year. It's subject to automatic issue closing if there is no activity in the next 15 days. |
…nal-module-fix Correct ExternalModule's global option (#6933)
I believe this can be closed now, since #7038 was merged. |
This issue had no activity for at least half a year. It's subject to automatic issue closing if there is no activity in the next 15 days. |
Solved in #7038 |
webpack/lib/ExternalModule.js
Line 116 in 0e404b8
Hi there, in attempting to get our server side bundles set up properly, I think I discovered a bug introduced alongside the addition of configurable global objects (d95f93f)
As of Webpack 4.4.1, this is the output I get back from the 'global' option:
I believe the intent of the commit was:
Which would lookup the module by name in the provided global object.
Do you want to request a feature or report a bug? Bug
What is the current behavior? the source() of an ExternalModule with type 'global' yields the above snippet.
If the current behavior is a bug, please provide the steps to reproduce. Call .source() on an ExternalModule with type 'global'.
What is the expected behavior? I believe the intent is to lookup the module by name in the configured global, rather than look up the configured global in global scope (which is kinda what the current code does?)
If this is a feature request, what is motivation or use case for changing the behavior? N/A
Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System. Webpack 4.4.1, but it's the same in master.
The text was updated successfully, but these errors were encountered: