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

Specifier should not be resolved #93

Closed
Josh-Cena opened this issue Jun 29, 2022 · 2 comments
Closed

Specifier should not be resolved #93

Josh-Cena opened this issue Jun 29, 2022 · 2 comments

Comments

@Josh-Cena
Copy link

While working on microsoft/TypeScript#49663, Ron Buckton pointed out a pitfall in my initial implementation, which was largely inspired by this plugin. Example:

const a = import(Promise.resolve("foo"));

This should be importing [object Object], instead of foo.

Alternative solution is proposed in microsoft/TypeScript#49663 (comment)

@nicolo-ribaudo
Copy link
Contributor

This package passes a string to Promise.resolve, so it doesn't suffer from that problem. Remember that the import specifier should be stringified synchronously.

@Josh-Cena
Copy link
Author

Oh—I see. Forgot to try it first. Thanks for pointing out!

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2022
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