Possible to provide path to alternative tsconfig file? #8483
Replies: 8 comments 3 replies
-
We're also interested in this feature, currently our vue3 plugin generates a |
Beta Was this translation helpful? Give feedback.
-
I would love for this to be able to work out of the box, but for now I made a small Vite plugin that works around this. It copies your |
Beta Was this translation helpful? Give feedback.
-
I also ended up writing a file swapping plugin to fit our needs: https://github.com/alienfast/vite-plugin-tsconfig
We were dealing with failed CI storybook/vite builds only to learn that vite tries to discover the nearest Our use case: the |
Beta Was this translation helpful? Give feedback.
-
This has been here for a while... any chance of an official response? |
Beta Was this translation helpful? Give feedback.
-
I'd also really like a solution of some kind for this. I have used it previously as a workaround to the fact that VSCode also doesn't let you configure which I was planning to use
Solutions/thoughts would be useful. |
Beta Was this translation helpful? Give feedback.
-
I haven't tried it, but would setting the Vite |
Beta Was this translation helpful? Give feedback.
-
I got it working using the import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
export default defineConfig({
plugins: [
dts({
tsconfigPath: 'tsconfig.frontend.json'
})
],
... |
Beta Was this translation helpful? Give feedback.
-
my case is a little bit different. i have lots of test file written in typescript and i'ld like to exclude those test files when typescrpt compiler does the type check:
And I still need typescript type check works when edit/view the files. So the expect behavior is remain all the files are type checked(no exclude in tsconfig.json) and exclude those test files in build time. In the begining I was trying to filter to how to add the tsconfig.json -> no {
"extends": "./tsconfig.json",
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"]
}
and the build script is updated as:
build.sh: export PATH=node_modules/.bin:$PATH
tsc --project ./tsconfig.build.json && vite build Read more about
|
Beta Was this translation helpful? Give feedback.
-
I'm wondering if its possible to explicitly configure Vite to use a tsconfig file of my choosing?
I've looked through the docs and can't find any information in the config API for being able to specify this explicitly.
When working with NX dev tools it is standard to compose your TS settings across multiple files with
tsconfig.app.json
being the actual entry point that matters for serving/building the application. I'd like to be able to update vite to leverage the configuration defined intsconfig.app.json
instead of automatically picking uptsconfig.json
Beta Was this translation helpful? Give feedback.
All reactions