We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I think it would be great if the syntax was closer to what's being introduced in Import Assertions:
import logoModuleReference from "./logo.svg" as reference; // OR const logoModuleReference: ModuleReference = await import('./logo.svg', { as: 'reference' }); const logoUrl: string = URL.createObjectURL(logoModuleReference); import workerModuleReference from "./worker.js" as reference; const worker = new Worker(workerModuleReference);
Note: I've rewritten this post, because I've interpreted the goal of Import Assertions wrong.
The text was updated successfully, but these errors were encountered:
From the current state of the import attributes proposal, it would look like this:
import logoModuleReference from "./logo.svg" with { asReference: true }; // or import logoModuleReference from "./logo.svg" with { as: "reference" };
Sorry, something went wrong.
No branches or pull requests
I think it would be great if the syntax was closer to what's being introduced in Import Assertions:
Note: I've rewritten this post, because I've interpreted the goal of Import Assertions wrong.
The text was updated successfully, but these errors were encountered: