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

Another problem with export default? #422

Closed
dandv opened this issue Aug 22, 2018 · 1 comment
Closed

Another problem with export default? #422

dandv opened this issue Aug 22, 2018 · 1 comment

Comments

@dandv
Copy link

dandv commented Aug 22, 2018

It seems that export default Foo used in conjunction with Dynamic imports() also forces the developer to access all the exported properties through .default:

const Highcharts = await import('https://code.highcharts.com/js/es-modules/masters/highcharts.src.js');
Highcharts.default.chart('container', { ... });  // Highcharts.chart is undefined

This actually happens with HighCharts (fiddle), for which named exports work fine if if imported statically.

Would it be worth adding that to the export default can lead to problems page?

PS: thanks for making the book free!

@basarat
Copy link
Owner

basarat commented Aug 28, 2018

Thanks 🌹

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