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

Dynamic import require #2054

Closed
Fenzland opened this issue Apr 5, 2019 · 4 comments
Closed

Dynamic import require #2054

Fenzland opened this issue Apr 5, 2019 · 4 comments
Milestone

Comments

@Fenzland
Copy link
Contributor

Fenzland commented Apr 5, 2019

ESModules without dynamic import is incomplete.
We cannot do this:

if( whenWeNeed() )
    import 'some_thing';

nor this:

const need= whatWeNeed();
    import need;

Only dynamic import can make ESM as strong as CommonJS or AMD.

Maybe there are some security reasons. But local dynamic import should be retain.

@ry
Copy link
Member

ry commented Apr 5, 2019

Dynamic import is indeed not yet supported. I was surprised to see that we don't have an issue for this yet. Thanks for creating this - it's on my roadmap.

@ry ry added this to the v0.4 milestone Apr 5, 2019
@hayd
Copy link
Contributor

hayd commented Apr 7, 2019

#1789 is related (also on ry's roadmap!)

@ry
Copy link
Member

ry commented Apr 8, 2019

Oh thanks @hayd. Somehow that didn't come up when I was searching.

Closing. Duplicate of #1789.

@ry ry closed this as completed Apr 8, 2019
@Fenzland
Copy link
Contributor Author

Oh thanks @hayd. Somehow that didn't come up when I was searching.

Closing. Duplicate of #1789.

so did I

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

3 participants