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

import cannot be called from a module #19

Open
letorbi opened this issue May 11, 2018 · 1 comment
Open

import cannot be called from a module #19

letorbi opened this issue May 11, 2018 · 1 comment
Labels
bug Something isn't working enhancement New feature or request version 2 Postponed to version 2

Comments

@letorbi
Copy link
Owner

letorbi commented May 11, 2018

Firefox 59 throws an error when an ES6 module is loaded via:

import * as foo from 'fooModule';

This seems to be due to the fact that import statements are only allowed on the top-level of a script, but the module-code loaded by Tarp.require is wrapped into a function.

@letorbi
Copy link
Owner Author

letorbi commented May 11, 2018

A possible solution would be the implementation of https:/tc39/proposal-dynamic-import.

@letorbi letorbi added the enhancement New feature or request label May 11, 2018
@letorbi letorbi added the version 2 Postponed to version 2 label Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request version 2 Postponed to version 2
Projects
None yet
Development

No branches or pull requests

1 participant