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

Bundled import.meta.main should reflect loaded state. #6333

Closed
kitsonk opened this issue Jun 17, 2020 · 3 comments
Closed

Bundled import.meta.main should reflect loaded state. #6333

kitsonk opened this issue Jun 17, 2020 · 3 comments

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Jun 17, 2020

Currently, during bundling the import.meta.main is set to true for the main module, but when that bundle is loaded, the main module might not be loaded as the main module and so the import.meta.main should be false.

@kitsonk kitsonk mentioned this issue Jun 17, 2020
18 tasks
@kitsonk
Copy link
Contributor Author

kitsonk commented Jun 20, 2020

This appears not to be possible as long as we use the system loader for the snapshots, because use of the import keyword throws outside of a module, and there is no way to safely access it, and we have to compare the runtime import.meta.main to the bundled main module.

@kitsonk
Copy link
Contributor Author

kitsonk commented Jul 21, 2020

This is potentially possible now that system_loader.js isn't being used for the snapshots and deno_typescript is gone, so this can be revisited.

@kitsonk
Copy link
Contributor Author

kitsonk commented Oct 24, 2020

This was fixed with #8058.

@kitsonk kitsonk closed this as completed Oct 24, 2020
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

1 participant