-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Change temp directory #723
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
Comments
If this feature is approved, we can make some modification based on #354 to achieve it |
👍 I think it makes perfect sense to use an OS temp directory. Is there any reason why we haven't been using it? Instead of |
To be clear about my intentions, I'm attempting to build in cloud functions pulling .md content from firestore as a weird sort of compiled CMS experiement. The compiled files can then either be pushed to hosting, or to storage with hosting rules to points to the files. I was able to get it to work by:
This allowed me to use vuepress in a writable directory while still using the installed node packages (node will walk up directories until it finds a node_modules folder and use packages from there). None of that would be necessary if we could explicitly control the temp directory for VuePress. |
This ensures that the defaults work under read-only node_modules. This is the case in certain runtime environments (vuejs#723) as well as under Yarn v2's Plug'n'Play (aka PNP).
This ensures that the defaults work under read-only node_modules. This is the case in certain runtime environments (vuejs#723) as well as under Yarn v2's Plug'n'Play (PNP). This commit also implements best-effort cleanup of any such temporary directories on process exit.
Feature request
Enable users to change the location of the .temp directory for the build process.
What problem does this feature solve?
I'm attempting to run VuePress within Google Cloud functions where the node_modules folder is readonly. Based on the errors I'm getting, it looks like VuePress is attempting to make use of a temp directory within node_modules, rather than in the src or dist locations.
What does the proposed API look like?
For the cli
vuepress build --dist .vuepress/dist --temp /tmp/vuepresstemp /tmp/client/
Though an extra configuration option would be helpful as well.
How should this be implemented in your opinion?
Are you willing to work on this yourself?**
With some general direction, I'd be happy to make a PR.
The text was updated successfully, but these errors were encountered: