Skip to content

Conversation

targos
Copy link
Member

@targos targos commented Jun 16, 2021

The URL is converted to an absolute path, so the rest works as before.
This is to enable applications written in ESM to do new Ignitor(import.meta.url)
as the __dirname variable doesn't exist in ESM.

The URL is converted to an absolute path, so the rest works as before.
This is to enable applications written in ESM to do `new Ignitor(import.meta.url)`
as the `__dirname` variable doesn't exist in ESM.
@targos targos requested a review from thetutlage June 17, 2021 14:33
@thetutlage
Copy link
Member

How about moving this to a helper function inside @poppinss/utils, as it will be used a lot in rest of the codebase?

@targos
Copy link
Member Author

targos commented Jun 17, 2021

I don't know yet if it will be used elsewhere. How about we move it to a helper function the next time I need it?

@thetutlage
Copy link
Member

Yup. Sounds like a deal

@thetutlage thetutlage merged commit 2814f5f into adonisjs:develop Jun 17, 2021
@targos targos deleted the ignitor-url branch June 17, 2021 15:37
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

Successfully merging this pull request may close these issues.

2 participants