Array/object default options (format, screen, domains, densities…) cannot be overrided
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 331
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 9
Description
Due to the use of DefineNuxtModule({ defaults: ... }), any user-provided configuration in nuxt.config.js is merged with the module defaults, including all array and object options.
For exampke, this behavior prevent the user to override default densities: [ 1, 2 ] with densities: [ 1 ]. This is a major issue to me.
A solution could be to use defuFn or a custom merger to allow overriding some properties with functions while preserving the default behavior.
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 at the module configuration entry point using DefineNuxtModule({ defaults: ... }) and review how nuxt.config.js values are merged. Reproduce the densities example with [1, 2] and [1], then verify that array and object options can be explicitly overridden while other defaults remain intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100