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 polyfills loading order #1905

Merged
merged 1 commit into from
Sep 28, 2017
Merged

Fix polyfills loading order #1905

merged 1 commit into from
Sep 28, 2017

Conversation

Hypnosphi
Copy link
Member

Issue: addons.js is loaded before polyfills in manager entry, which leads to issues in IE.

What I did

I put addons.js right after the polyfills

How to test

Open React and Vue kitchen sink apps in IE11

@codecov
Copy link

codecov bot commented Sep 28, 2017

Codecov Report

Merging #1905 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1905   +/-   ##
=======================================
  Coverage   21.31%   21.31%           
=======================================
  Files         257      257           
  Lines        5737     5737           
  Branches      693      685    -8     
=======================================
  Hits         1223     1223           
- Misses       3990     4002   +12     
+ Partials      524      512   -12
Impacted Files Coverage Δ
app/react/src/server/config.js 0% <0%> (ø) ⬆️
app/vue/src/server/config.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/containers/left_panel.js 25.71% <0%> (ø) ⬆️
lib/ui/src/modules/ui/libs/hierarchy.js 48.8% <0%> (ø) ⬆️
addons/info/src/components/Props.js 36.36% <0%> (ø) ⬆️
addons/info/src/components/PropTable.js 21% <0%> (ø) ⬆️
app/react-native/src/preview/story_kind.js 0% <0%> (ø) ⬆️
addons/storyshots/src/require_context.js 0% <0%> (ø) ⬆️
.../ui/src/modules/ui/components/left_panel/header.js 29.62% <0%> (ø) ⬆️
lib/ui/src/modules/ui/configs/handle_routing.js 28.04% <0%> (ø) ⬆️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8267159...603c1bf. Read the comment docs.

@ndelangen
Copy link
Member

Looks good, but will this help with the issue we're having in 3.3?

@Hypnosphi
Copy link
Member Author

That's exactly what it addresses. In 3.3, addon-links requires glamorous, which uses Object.assign without adding a polyfill. That's why we don't observe this problem on master. The change makes sense on master as well though

Copy link
Member

@ndelangen ndelangen left a comment

Choose a reason for hiding this comment

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

I'm making a mental note to revisit this code later, because this code looks super fishy to me.

I would prefer to not have to inject entry points like this.

@ndelangen
Copy link
Member

If you've tested this @Hypnosphi go ahead and merge!

@Hypnosphi
Copy link
Member Author

One possible alternative is to unshift polyfill into both entries right before passing the config to webpack

@Hypnosphi Hypnosphi merged commit 2f16928 into master Sep 28, 2017
@Hypnosphi Hypnosphi deleted the fix-polyfills-order branch September 28, 2017 19:43
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.

2 participants