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

import.meta.url will throw an error #566

Open
sayore opened this issue Feb 26, 2021 · 0 comments
Open

import.meta.url will throw an error #566

sayore opened this issue Feb 26, 2021 · 0 comments

Comments

@sayore
Copy link

sayore commented Feb 26, 2021

Since the Project is dead i will just copy what i've written in documentationjs:

For the time being i recommend the following:

let PackagePath = process.argv[1];  // >exemplary> /npm/repo/your-package or /home/Someone/Projects/your-package
let CurrentWorkingDirectory = process.cwd(); // /somewhere/else

PackagePath should resolve to the directory to where the package itself is, process.cwd() will give you the directory the js/bin is executed at.
This can be used to have a BaseClass to resolve to the right import.meta.url-path you wanted to get.

I know this is obvious stuff, but just for people looking for it :p
After switching the path with the process.* alternatives docs should build fine.

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