-
Notifications
You must be signed in to change notification settings - Fork 6
add a Symbol polyfill #6
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
==========================================
+ Coverage 93.7% 93.79% +0.08%
==========================================
Files 4 4
Lines 143 145 +2
Branches 24 24
==========================================
+ Hits 134 136 +2
Misses 9 9
Continue to review full report at Codecov.
|
| "presets": [ | ||
| ["@babel/preset-env", { | ||
| "targets": { | ||
| "browsers": ["last 2 versions", "IE 10"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change was already in the branch. not sure if you prefer to keep it, but fwiw: https://jamie.build/last-2-versions
| } | ||
|
|
||
| for (const methodName of this.methods) { | ||
| this.methods.forEach((methodName) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The polyfill didn't place nicely with the Babel transformation code that results from the for..of so I changed this to a forEach. IE 11 was thowing an Object expected error.
|
Thanks for putting that together. I'll take a look at it later tonight. |
|
Using this branch I no longer have an error regarding |
|
Thanks for your work on this 🍺 In the future please keep from adding |
For Bugs and Features; did you add new tests?
No
Motivation / Use-Case
To maintain IE 10 & 11 compatibility,
Symbolneeds to be polyfilled since these browsers do not support it. Fixes #5.Breaking Changes
None
Additional Info
This PR builds off the commit in your ie-assign-symbol branch; not sure if you wanted those changes regardless but if not I can remove them. With this PR, the loglevelnext.min.js file bumps up to 18 kB. I also gave
useBuiltIns: 'usage'a shot and that bumped the size to 30 kB.