I created the following configuration file with reference to the following document in order to use environment variables in the configuration.
https://vitejs.dev/config/
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Hello @rom-sky-blue. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 3 days.
Related plugins
[X] plugin-vue
[X] plugin-vue-jsx
Describe the bug
I created the following configuration file with reference to the following document in order to use environment variables in the configuration. https://vitejs.dev/config/
vite.config.ts
It appears to work fine in development mode, but I get the following TypeScritpt error when I build
vitest.config.ts:6:3 - error TS2345: Argument of type 'UserConfigFnObject' is not assignable to parameter of type 'never'.
The same error occurs when I format it as shown in the following post. https://github.com/vitejs/vite/issues/13950
Reproduction
https://stackblitz.com/edit/vitejs-vite-osther?file=index.html&terminal=dev
Steps to reproduce
Only build script make
System Info
Used Package Manager
yarn
Logs
No response
Validations