Skip to content

Commit

Permalink
chore: use tsconfig for client build (vitejs#8815)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jun 28, 2022
1 parent 6886078 commit 10936cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
24 changes: 3 additions & 21 deletions packages/vite/rollup.config.ts
Expand Up @@ -19,14 +19,7 @@ const envConfig = defineConfig({
input: path.resolve(__dirname, 'src/client/env.ts'),
plugins: [
typescript({
tsconfig: false,
target: 'es2020',
module: 'esnext',
include: ['src/client/env.ts'],
baseUrl: path.resolve(__dirname, 'src/env'),
paths: {
'types/*': ['../../types/*']
}
tsconfig: path.resolve(__dirname, 'src/client/tsconfig.json')
})
],
output: {
Expand All @@ -40,13 +33,7 @@ const clientConfig = defineConfig({
external: ['./env', '@vite/env'],
plugins: [
typescript({
tsconfig: false,
target: 'es2020',
include: ['src/client/**/*.ts'],
baseUrl: path.resolve(__dirname, 'src/client'),
paths: {
'types/*': ['../../types/*']
}
tsconfig: path.resolve(__dirname, 'src/client/tsconfig.json')
})
],
output: {
Expand Down Expand Up @@ -102,12 +89,7 @@ function createNodePlugins(
}),
nodeResolve({ preferBuiltins: true }),
typescript({
tsconfig: 'src/node/tsconfig.json',
module: 'esnext',
target: 'es2020',
include: ['src/**/*.ts', 'types/**'],
exclude: ['src/**/__tests__/**'],
esModuleInterop: true,
tsconfig: path.resolve(__dirname, 'src/node/tsconfig.json'),
sourceMap,
declaration: declarationDir !== false,
declarationDir: declarationDir !== false ? declarationDir : undefined
Expand Down
2 changes: 0 additions & 2 deletions packages/vite/src/client/tsconfig.json
Expand Up @@ -2,8 +2,6 @@
"extends": "../../tsconfig.base.json",
"include": ["./", "../../types"],
"compilerOptions": {
"outDir": "../../dist/client",
"module": "ESNext",
"types": [],
"lib": ["ESNext", "DOM"],
"declaration": false
Expand Down
6 changes: 1 addition & 5 deletions packages/vite/src/node/tsconfig.json
Expand Up @@ -3,10 +3,6 @@
"include": ["./", "../../types"],
"exclude": ["**/__tests__"],
"compilerOptions": {
"target": "ES2020",
"outDir": "../../dist/node",
"module": "ESNext",
"lib": ["ESNext", "DOM"],
"sourceMap": true
"lib": ["ESNext", "DOM"]
}
}

0 comments on commit 10936cd

Please sign in to comment.