In correct type for first param in `getViteConfig()`
Closed this issue · 3 comments
Astro Info
Astro v5.0.9
Node v20.12.2
System Linux (x64)
Package Manager bun
Output static
Adapter none
Integrations none
Clipboard command not found!
Please manually copy the text above.
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Could you guy confirm if the document and example is incomplete because when I try to add test
property into the object of the first param of getViteConfig()
function, I received error from vscode:
Here is the message:
Object literal may only specify known properties, and 'test' does not exist in type 'UserConfig'.ts(2353)
Workspace dependencies:
"devDependencies": {
"@types/bun": "^1.1.14",
"@types/node": "^22.10.2",
"tsup": "^8.3.5",
"vitest": "^2.1.8"
},
And I copied from the example file so this may not be a bug but more of request document improvement: https://github.com/withastro/astro/blob/latest/examples/with-vitest/vitest.config.ts
What's the expected result?
According to the document and example, it should accept test
property, not firing an error.
Link to Minimal Reproducible Example
https://github.com/withastro/astro/blob/latest/examples/with-vitest/vitest.config.ts
Participation
- I am willing to submit a pull request for this issue.
The linked reproduction doesn't match your screenshot. Can you link a repro that matches.
Hello @ngdangtu-vn. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro
will be closed if they have no activity within 3 days.
Nah, I give up on testing for now