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

<script type="system-module"> support #1864

Closed
guybedford opened this issue Oct 8, 2018 · 4 comments
Closed

<script type="system-module"> support #1864

guybedford opened this issue Oct 8, 2018 · 4 comments

Comments

@guybedford
Copy link
Member

With this we can then support the integrity and cross-origin attributes.

@Hypercubed
Copy link

In this case, would the content be ES module or System.register format?

@guybedford
Copy link
Member Author

This would be for System.register module loading.

Supporting ES modules in this project is an interesting concept, but gets tricky where ES modules load other ES modules, because we can no longer control the resolver.

For that reason I usually like for this project to remain an isolated graph, and instead use ES module shims to load ES modules, but there could certainly be value in supporting native loading bridges.

It might get far with these use cases just to do something like const nativeModule = await import('native-module'); System.set('native-module', nativeModule); since that also allows conditionally checking for existence of the native loader (eg if (hasDynamicImport) branches in code etc).

@guybedford
Copy link
Member Author

I'm referring to this project btw - http://npmjs.org/package/es-module-shims.

@guybedford
Copy link
Member Author

Implemented in #2015.

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