-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Make Array.prototype.includes polyfill not enumerable #1133
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
Comments
@zwug thanks for checking in. could you elaborate a bit on what you mean by "enumerable" in this case? I'm not 100% sure I understand how polyfills.js is conflicting with stylus. |
Here is a sample snippet with the problem I am facing
Stylus loader is using the same for..in loop to iterate through an array of strings. And it fails trying to treat function as a string. By enumerable I mean the descriptor value. This code works correctly:
|
Thanks for elaborating. If you'd like to contribute the change for this so you get credit, we'd be happy to accept. Otherwise I'm good to make this change as well. |
I'll do it |
My webpack build fails on stylus-loader, because stylus-loader uses
for .. in
loop to iterate through an array of files. And becauseincludes
property is enumerable, there is an iteration with it which causes failure. I have already created an issue in stylus-loader, but i think webpack-dev-server should change the polyfill property setting too. I can make a pull request withObject.defineProperty
to fix this.Code
code in stylus-loader:
webpack-dev-server polyfill setting:
Expected Behavior
Array.prototype.includes should not be enumerable
Actual Behavior
Array.prototype.includes is enumerable
For Bugs; How can we reproduce the behaviour?
node v4.8.4 + stylus-loader v3.0.1 should do it
The text was updated successfully, but these errors were encountered: