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

What variable should be used to distinguish whether the current program is compiled? #10326

Closed
gcxfd opened this issue Apr 23, 2021 · 1 comment

Comments

@gcxfd
Copy link

gcxfd commented Apr 23, 2021

deno compile will make import.meta.url an absolute path.

What variable should be used to distinguish whether the current program is compiled?

So I can choose whether to use import.meta.url or Deno.cwd

@jsejcksn
Copy link
Contributor

Hi @gcxfd: This was already discussed in #6344

You might be interested in Deno.mainModule.

@gcxfd gcxfd closed this as completed Apr 24, 2021
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