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

Cannot load core-js #29

Open
ngocdaothanh opened this issue Aug 9, 2020 · 2 comments
Open

Cannot load core-js #29

ngocdaothanh opened this issue Aug 9, 2020 · 2 comments

Comments

@ngocdaothanh
Copy link

core-js is a popular ES6 polyfill:
https://github.com/zloirock/core-js

For example, it's used in Babel:
https://babeljs.io/docs/en/babel-preset-env

I've used rollup:
https://github.com/ngocdaothanh/one-core-js

To merge all ES6 polyfill files:
https://github.com/zloirock/core-js/blob/master/packages/core-js/es/index.js

Into this one file:
https://github.com/ngocdaothanh/one-core-js/blob/master/es6polyfills.js

When esper.js loads that file, there's error:
Cant index propertyIsEnumerable of undefined

The error is thrown from here:
https://github.com/codecombat/esper.js/blob/master/src/Evaluator.js#L406

Would you please investigate and fix the error?

@basicer
Copy link
Member

basicer commented Aug 10, 2020

Is there any particular ES6 feature you are looking for? It might be easier to just implement that feature instead of trying to get a complicated polyfill to load.

@ngocdaothanh
Copy link
Author

I want some basic commonly used ES6 features like Array.from.

esper.js cannot load when cherry picking Array.from from core-js:
https://github.com/zloirock/core-js/blob/master/packages/core-js/es/array/from.js

esper.js cannot load es6-shim either:
https://github.com/paulmillr/es6-shim

This simple polyfill works however:
https://gist.github.com/brettz9/4212262

It would be perfect (ES6 feature complete) if esper.js can load popular ES6 polyfills.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants