Skip to content

Commit

Permalink
chore: use typescript for rollup configPlugin (#8290)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed May 23, 2022
1 parent c3ec60c commit fa538cf
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 19 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -34,6 +34,7 @@
},
"devDependencies": {
"@microsoft/api-extractor": "^7.23.1",
"@rollup/plugin-typescript": "^8.3.2",
"@types/babel__core": "^7.1.19",
"@types/babel__standalone": "^7.1.4",
"@types/convert-source-map": "^1.5.2",
Expand Down Expand Up @@ -77,11 +78,11 @@
"prompts": "^2.4.2",
"rimraf": "^3.0.2",
"rollup": "^2.72.1",
"rollup-plugin-esbuild": "^4.9.1",
"semver": "^7.3.7",
"simple-git-hooks": "^2.7.0",
"sirv": "^2.0.2",
"ts-node": "^10.7.0",
"tslib": "^2.4.0",
"typescript": "^4.6.4",
"unbuild": "^0.7.4",
"vite": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Expand Up @@ -47,7 +47,7 @@
"scripts": {
"dev": "rimraf dist && pnpm run build-bundle -w",
"build": "rimraf dist && run-s build-bundle build-types",
"build-bundle": "rollup --config rollup.config.ts --configPlugin esbuild",
"build-bundle": "rollup --config rollup.config.ts --configPlugin typescript",
"build-types": "run-s build-temp-types patch-types roll-types",
"build-temp-types": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
"patch-types": "esno scripts/patchTypes.ts",
Expand Down
2 changes: 2 additions & 0 deletions packages/vite/rollup.config.ts
Expand Up @@ -19,6 +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'],
Expand All @@ -39,6 +40,7 @@ const clientConfig = defineConfig({
external: ['./env', '@vite/env'],
plugins: [
typescript({
tsconfig: false,
target: 'es2020',
include: ['src/client/**/*.ts'],
baseUrl: path.resolve(__dirname, 'src/client'),
Expand Down
9 changes: 9 additions & 0 deletions packages/vite/tsconfig.json
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"strict": false,
"declaration": false,
"resolveJsonModule": true
},
"include": ["./rollup.config.ts"]
}
36 changes: 19 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fa538cf

Please sign in to comment.