feat: support configuring local options file path
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.3k
- Forks
- 214
- Avg merge
- 13h 22m
- Merged PRs (30d)
- 18
Description
🆒 Your use case
By default Nuxt devtools options are saved to the current OS user's home directory. This works fine enough for local development, but when working from a docker container the container's home directory will very likely be at a location that is not mounted as a volume and persisted on the host system, leading to devtools options getting reset every time a development container is recreated.
🆕 The solution you'd like
I would like to be able to configure devtools options to be saved in another directory, ideally in my project's own .nuxt directory. Perhaps something like this:
export default defineNuxtConfig({
devtools: {
enabled: true,
optionsDir: '.nuxt/devtools',
},
});
🔍 Alternatives you've considered
It may be possible to mount and bind the container user's home directory to a project specific location, but this feels inelegant to me.
ℹ️ Additional info
I could also see this feature being useful if you want devtools configured differently per project instead of options always being shared system wide.
Extra mile, maybe the home directory sets defaults, and each project can extend those and override as desired? That feels overkill to me though.
Thanks for all your work on Nuxt and Nuxt Devtools! Happy to be a part of this community and share in the awesomeness of these tools. You all have made working on the web fun again!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading packages/devtools/src/utils/local-options.ts, linked in the issue, and trace how the Nuxt devtools configuration reaches the local options path. Define how an optionsDir such as .nuxt/devtools should be resolved and persisted, while preserving the current home-directory behavior when it is not configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100