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: allow globalObject to be expression #12927

Closed
wants to merge 3 commits into from
Closed

Conversation

alexander-akait
Copy link
Member

What kind of change does this PR introduce?

bugfix, fixes #12924

Did you add tests for your changes?

Yes

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?

No

@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)

@alexander-akait
Copy link
Member Author

I think we need add tests for hmr, bug don't found how to easy to do it

@webpack-bot
Copy link
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

Copy link
Member

@sokra sokra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can add a simple helper function that only wraps it in brackets when necessary. I think this should do it: /^[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\.]*$/iu. You can put that in Template.js. Best create this regexp only once.

@vankop
Copy link
Member

vankop commented Nov 26, 2021

original issue was resolved

@vankop vankop deleted the issue-12924 branch November 26, 2021 08:36
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.

Async chunk loading breaks complex expressions in globalObject option
4 participants