#1691 Implement dynamic module import

Open
opened 4 months ago by Moonchild · 1 comments

This is for adding a “function-like” import() module loading syntactic form to JavaScript, that websites try to use instead of the previously-established ES6 modules loading and unloading methods.

Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1342012
Prerequisite: https://bugzilla.mozilla.org/show_bug.cgi?id=1484948

Various crash followup bugs linked in the ref bug.

This is for adding a "function-like" import() module loading syntactic form to JavaScript, that websites try to use instead of the previously-established ES6 modules loading and unloading methods. Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1342012 Prerequisite: https://bugzilla.mozilla.org/show_bug.cgi?id=1484948 Various crash followup bugs linked in the ref bug.
Moonchild added the
C: Javascript
label 4 months ago
Moonchild added the
Enhancement
label 4 months ago
Moonchild added the
Web Compatibility
label 4 months ago
phaleth commented 1 week ago

Currently sites built with SvelteKit break with the following error shown in the console.

SyntaxError: expected expression, got keyword 'import'[Learn More]

There is no way to get around the issue with for example shimport as the framework itself renders import() function calls during build time.

The SvelteKit dev team envisioned support of legacy browsers (#12) but there is no clear plan on how to do that yet.

Currently sites built with [SvelteKit](https://github.com/sveltejs/kit) break with the following error shown in the console. `SyntaxError: expected expression, got keyword 'import'`[[Learn More]](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Unexpected_token?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default) There is no way to get around the issue with for example [shimport](https://github.com/rich-harris/shimport) as the framework itself renders `import()` function calls during build time. The SvelteKit dev team envisioned support of legacy browsers [(#12)](https://github.com/sveltejs/kit) but there is no clear plan on how to do that yet.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.