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

fix: set default cache dir by using __dirname #158

Merged
merged 1 commit into from
Apr 27, 2024
Merged

Conversation

ayushmanchhabra
Copy link
Collaborator

@ayushmanchhabra ayushmanchhabra commented Apr 27, 2024

  • Add missing srcDir option

Fixes: #157

@ayushmanchhabra
Copy link
Collaborator Author

@ronny1982

Copy link

@ronny1982 ronny1982 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Keep in mind that __dirname is not forward compatible in case of switching to ESM.
Functionality was not tested/verified.

@ayushmanchhabra
Copy link
Collaborator Author

const __dirname = path.dirname(url.fileURLToPath(import.meta.url));

ESM is used by default. Instead of using import.meta.dirname, I've used this to maintain backward compat.

@ayushmanchhabra ayushmanchhabra merged commit 601911f into main Apr 27, 2024
3 checks passed
@ayushmanchhabra ayushmanchhabra deleted the dev-157 branch April 27, 2024 16:08
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.

NW fails to spawn NWJS binary when using workspaces
2 participants