quokka icon indicating copy to clipboard operation
quokka copied to clipboard

Add Quokka configuration option to set `process.cwd()`

Open smcenlly opened this issue 4 years ago • 2 comments

From @marcoSven via our discord channel:

What I would like is to use a relative path within a project. So in this example https://gitlab.com/marcoSven/quokka, the relative path './quokka.txt' should work if I only open the quokka.js file (no projects/no directories open), the src directory, or the root directory in a Sublime Text window.

Currently the relative path './quokka.txt' does not work when you open the root directory - in other words allow process.cwd() to be equal __dirname.

smcenlly avatar Jun 02 '20 22:06 smcenlly

You should be able to use __dirname as a workaround to needing process.cwd() to be customized.

smcenlly avatar Jun 02 '20 22:06 smcenlly

Thank you @smcenlly yes I am using this as a workaround for now, but using the javascript file location as root just makes more sense to me, so that a relative path always works. A configuration, if not default would be great.

marcoSven avatar Jun 02 '20 22:06 marcoSven