Closed nicolasr75 closed 3 years ago
I was wondering whether I can test the polyfill in the browser with ES6 modules buildless?
Problem is:
proposal-temporal\lib\intrinsicclass.mjs
has this
import ESGetIntrinsic from 'es-abstract/GetIntrinsic.js';
but es-abstract uses only CommonJS modules which therefore results in the error
Uncaught SyntaxError: The requested module '../../es-abstract/GetIntrinsic.js' does not provide an export named 'default'
I can fix this by modifying GetIntrinsic.js to include export default module.exports but that would have to be done for dozens of other files.
export default module.exports
Any idea?
No, you'd need a bundler - as is generally the case for anything consumed from npm.
Ok, thanks!
I was wondering whether I can test the polyfill in the browser with ES6 modules buildless?
Problem is:
proposal-temporal\lib\intrinsicclass.mjs
has this
import ESGetIntrinsic from 'es-abstract/GetIntrinsic.js';
but es-abstract uses only CommonJS modules which therefore results in the error
Uncaught SyntaxError: The requested module '../../es-abstract/GetIntrinsic.js' does not provide an export named 'default'
I can fix this by modifying GetIntrinsic.js to include
export default module.exports
but that would have to be done for dozens of other files.Any idea?