Skip to content

Also add script.crossOrigin for hot-reloaded chunks#5729

Merged
sokra merged 1 commit intowebpack:masterfrom
STRML:feature/crossOrigin-hotReload
Sep 30, 2017
Merged

Also add script.crossOrigin for hot-reloaded chunks#5729
sokra merged 1 commit intowebpack:masterfrom
STRML:feature/crossOrigin-hotReload

Conversation

@STRML
Copy link
Copy Markdown
Contributor

@STRML STRML commented Sep 27, 2017

What kind of change does this PR introduce?

Bugfix - or a feature, depending on your point of view.

Did you add tests for your changes?

I didn't see any tests asserting this behavior; however, I ran the change on my own applications and found that it fixed the React 16 errors we were seeing (https://facebook.github.io/react/docs/cross-origin-errors.html)

Summary

Also adds the crossOrigin attribute to hot-reloaded chunks if output.crossOriginLoading is set.

Related: #988

Useful especially for hot-reloaded React 16 apps so that the global
onerror handler can render error boundaries properly.

Does this PR introduce a breaking change?

No breaking change - dev only.

Related: webpack#988

Useful especially for hot-reloaded React 16 apps so that the global
onerror handler can render error boundaries properly.
@webpack-bot
Copy link
Copy Markdown
Contributor

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

@sokra sokra merged commit b8f181f into webpack:master Sep 30, 2017
@sokra
Copy link
Copy Markdown
Member

sokra commented Sep 30, 2017

Thanks

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.

4 participants