Skip to content

Commit

Permalink
move vite typescript build to a project reference
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Jan 21, 2025
1 parent f779011 commit 9aca8c2
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 35 deletions.
1 change: 1 addition & 0 deletions packages/vite/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/tests/**/*.js
/tests/**/*.d.ts
/tests/**/*.map
/build/
9 changes: 0 additions & 9 deletions packages/vite/index.d.ts

This file was deleted.

File renamed without changes.
10 changes: 3 additions & 7 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"type": "module",
"exports": {
".": {
"default": "./index.mjs",
"types": "./index.d.ts"
"default": "./build/index.js",
"types": "./build/index.d.ts"
}
},
"peerDependencies": {
Expand Down Expand Up @@ -44,10 +44,6 @@
"vite": "^5.3.3"
},
"files": [
"index.mjs",
"index.d.ts",
"src/**/*.js",
"src/**/*.d.ts",
"src/**/*.js.map"
"build"
]
}
11 changes: 11 additions & 0 deletions packages/vite/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": [
"./src/**/*.ts",
"./index.ts"
],
"extends": "../../tsconfig-base.json",
"compilerOptions": {
"composite": true,
"outDir": "build"
},
}
19 changes: 19 additions & 0 deletions tsconfig-base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es2019",
"module": "nodenext",
"moduleResolution": "nodenext",
"declaration": true,
"typeRoots": ["types", "node_modules/@types"],
"esModuleInterop": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"sourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"allowUnreachableCode": false,
"strict": true,
"skipLibCheck": true,
"useUnknownInCatchVariables": false,
},
}
24 changes: 5 additions & 19 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,7 @@
"./test-packages/release/src/**/*.ts",
"./tests/scenarios/**/*.ts"
],
"compilerOptions": {
"target": "es2019",
"module": "nodenext",
"moduleResolution": "nodenext",
"declaration": true,
"typeRoots": ["types", "node_modules/@types"],
"esModuleInterop": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"sourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"allowUnreachableCode": false,
"strict": true,
"skipLibCheck": true,
"useUnknownInCatchVariables": false,
},
"extends": "./tsconfig-base.json",
"exclude": [
"node_modules",
"packages/*/tmp",
Expand All @@ -34,9 +18,11 @@
"tmp",
"tests/scenarios/output",
"packages/config-meta-loader/src",
"packages/router/src"
"packages/router/src",
"packages/vite"
],
"references": [
{ "path": "packages/config-meta-loader" }
{ "path": "packages/config-meta-loader" },
{ "path": "packages/vite" }
]
}

0 comments on commit 9aca8c2

Please sign in to comment.