Skip to content

Commit 1d5d432

Browse files
committed
Squashed commit of the following:
commit d856c4b Author: Anthony Fu <[email protected]> Date: Thu Dec 30 00:25:59 2021 +0800 fix(ssr): move `vite:ssr-require-hook` after user plugins (vitejs#6306) commit b45f4ad Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed Dec 29 14:49:15 2021 +0100 chore(deps): update all non-major dependencies (vitejs#6185) commit 4d75b2e Author: Niputi <[email protected]> Date: Wed Dec 29 14:48:13 2021 +0100 feat: catch postcss error messages (vitejs#6293) commit f68ed8b Author: Bogdan Chadkin <[email protected]> Date: Wed Dec 29 16:40:13 2021 +0300 fix: replace execa with cross-spawn (vitejs#6299) commit 44bb4da Author: patak <[email protected]> Date: Wed Dec 29 12:51:46 2021 +0100 chore(deps): update to esbuild fixed at 0.14.3 (vitejs#5861) commit 9ad7c55 Author: patak <[email protected]> Date: Wed Dec 29 11:32:49 2021 +0100 deps: update to typescript 4.5.4 (vitejs#6297) commit 1da104e Author: Aron Griffis <[email protected]> Date: Wed Dec 29 02:50:19 2021 -0500 fix: don't force terser on non-legacy (fix vitejs#6266) (vitejs#6272) commit 5279de6 Author: ygj6 <[email protected]> Date: Wed Dec 29 05:30:47 2021 +0800 feat: import.meta.glob support ?raw (vitejs#5545) commit 6d4ee18 Author: Bjorn Lu <[email protected]> Date: Wed Dec 29 04:27:49 2021 +0800 feat(define): prevent assignment (vitejs#5515) commit ac3f434 Author: Bogdan Chadkin <[email protected]> Date: Tue Dec 28 23:26:46 2021 +0300 fix: upgrade postcss-modules (vitejs#6248) commit 5a111ce Author: Bogdan Chadkin <[email protected]> Date: Tue Dec 28 23:23:42 2021 +0300 fix: replace chalk with picocolors (vitejs#6277) commit 7e3e84e Author: patak-dev <[email protected]> Date: Tue Dec 28 15:07:10 2021 +0100 release: v2.7.9 commit 83ad7bf Author: Anthony Fu <[email protected]> Date: Tue Dec 28 21:52:41 2021 +0800 fix: revert vitejs#6251 (vitejs#6290) This reverts commit 49da986. commit 1cbf0e1 Author: Cristian Pallarés <[email protected]> Date: Tue Dec 28 11:30:42 2021 +0100 test: fix test typo (vitejs#6285) commit d13ced5 Author: patak-dev <[email protected]> Date: Tue Dec 28 09:40:48 2021 +0100 release: v2.7.8 commit dcb1df4 Author: itibbers <[email protected]> Date: Tue Dec 28 16:30:32 2021 +0800 docs: add frontmatters to fix __VP_STATIC_START__ (vitejs#6283) commit 60ce7f9 Author: Anthony Fu <[email protected]> Date: Tue Dec 28 16:20:12 2021 +0800 fix(ssr): capture scope declaration correctly (vitejs#6281) commit eb08ec5 Author: Niputi <[email protected]> Date: Tue Dec 28 06:10:37 2021 +0100 chore: remove acorn plugins (vitejs#6275) commit 64b1595 Author: zhangenming <[email protected]> Date: Tue Dec 28 11:52:51 2021 +0800 chore(create-vite): add more gitignore (vitejs#6247) commit 49da986 Author: sanyuan <[email protected]> Date: Tue Dec 28 05:30:54 2021 +0800 fix: seperate source and dep for dymamic import after build (vitejs#6251) commit 394539c Author: Bogdan Chadkin <[email protected]> Date: Tue Dec 28 00:29:23 2021 +0300 fix: upgrade to launch-editor with picocolors (vitejs#6209) commit 40e3f73 Author: Shinigami <[email protected]> Date: Mon Dec 27 11:42:24 2021 +0100 chore: fix link (vitejs#6269) commit e7306b5 Author: Shinigami <[email protected]> Date: Mon Dec 27 11:22:44 2021 +0100 chore: update bug report issue template (vitejs#6263) commit 1f945f6 Author: Aaron Bassett <[email protected]> Date: Sun Dec 26 15:28:47 2021 -0500 fix(html): show error overlay when parsing invalid file (vitejs#6184) commit 1d722c5 Author: patak-dev <[email protected]> Date: Sun Dec 26 06:35:04 2021 +0100 release: v2.7.7 commit 2e3fe59 Author: Anthony Fu <[email protected]> Date: Sun Dec 26 13:13:24 2021 +0800 fix(ssr): transform class props (vitejs#6261) commit 1a6e2da Author: ygj6 <[email protected]> Date: Sat Dec 25 18:24:44 2021 +0800 docs: typescript tips for using Type-Only Imports and Export (vitejs#6260) commit 6a47083 Author: Haoqun Jiang <[email protected]> Date: Fri Dec 24 14:02:43 2021 +0800 fix: update the vue version in the error message (vitejs#6252) commit 485e298 Author: Anthony Fu <[email protected]> Date: Thu Dec 23 21:45:13 2021 +0800 fix(ssr): nested destucture (vitejs#6249)
1 parent 451f361 commit 1d5d432

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1623
-2124
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ body:
1414
placeholder: Bug description
1515
validations:
1616
required: true
17-
- type: textarea
17+
- type: input
1818
id: reproduction
1919
attributes:
2020
label: Reproduction
21-
description: Please provide a link to a repo that can reproduce the problem you ran into. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. If no reproduction is provided after 3 days, it will be auto-closed.
21+
description: Please provide a link via [vite.new](https://vite.new/) or a link to a repo that can reproduce the problem you ran into. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. If no reproduction is provided after 3 days, it will be auto-closed.
2222
placeholder: Reproduction
2323
validations:
2424
required: true

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ LICENSE.md
99
pnpm-lock.yaml
1010
pnpm-workspace.yaml
1111
packages/playground/tsconfig-json-load-error/has-error/tsconfig.json
12+
packages/playground/html/invalid.html

docs/config/index.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: Configuring Vite
3+
---
4+
15
# Configuring Vite
26

37
## Config File

docs/guide/features.md

+8
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ Vite only performs transpilation on `.ts` files and does **NOT** perform type ch
3434

3535
Vite uses [esbuild](https://github.com/evanw/esbuild) to transpile TypeScript into JavaScript which is about 20~30x faster than vanilla `tsc`, and HMR updates can reflect in the browser in under 50ms.
3636

37+
Use the [Type-Only Imports and Export](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) syntax to avoid potential problems like type-only imports being incorrectly bundled. for example:
38+
39+
```ts
40+
import type { T } from 'only/types'
41+
export type { T }
42+
```
43+
3744
### TypeScript Compiler Options
3845

3946
Some configuration fields under `compilerOptions` in `tsconfig.json` require special attention.
@@ -63,6 +70,7 @@ But a few libraries haven't transitioned to this new default yet, including [`li
6370

6471
- [`extends`](https://www.typescriptlang.org/tsconfig#extends)
6572
- [`importsNotUsedAsValues`](https://www.typescriptlang.org/tsconfig#importsNotUsedAsValues)
73+
- [`preserveValueImports`](https://www.typescriptlang.org/tsconfig#preserveValueImports)
6674
- [`jsxFactory`](https://www.typescriptlang.org/tsconfig#jsxFactory)
6775
- [`jsxFragmentFactory`](https://www.typescriptlang.org/tsconfig#jsxFragmentFactory)
6876

package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@
2424
"ci-docs": "run-s build-vite build-plugin-vue build-docs"
2525
},
2626
"devDependencies": {
27-
"@microsoft/api-extractor": "^7.19.2",
27+
"@microsoft/api-extractor": "^7.19.3",
2828
"@types/fs-extra": "^9.0.13",
2929
"@types/jest": "^27.0.3",
30-
"@types/node": "^16.11.14",
30+
"@types/node": "^16.11.17",
3131
"@types/prompts": "^2.0.14",
3232
"@types/semver": "^7.3.9",
33-
"@typescript-eslint/eslint-plugin": "^5.7.0",
34-
"@typescript-eslint/parser": "^5.7.0",
33+
"@typescript-eslint/eslint-plugin": "^5.8.1",
34+
"@typescript-eslint/parser": "^5.8.1",
3535
"chalk": "^4.1.2",
36-
"conventional-changelog-cli": "^2.1.1",
36+
"conventional-changelog-cli": "^2.2.2",
3737
"cross-env": "^7.0.3",
38-
"esbuild": "^0.13.12",
39-
"eslint": "^8.4.1",
40-
"eslint-define-config": "^1.2.0",
38+
"esbuild": "0.14.3",
39+
"eslint": "^8.5.0",
40+
"eslint-define-config": "^1.2.1",
4141
"eslint-plugin-node": "^11.1.0",
4242
"execa": "^5.1.1",
4343
"fs-extra": "^10.0.0",
4444
"jest": "^27.4.5",
45-
"lint-staged": "^12.1.2",
45+
"lint-staged": "^12.1.4",
4646
"minimist": "^1.2.5",
4747
"node-fetch": "^2.6.6",
4848
"npm-run-all": "^4.1.5",
@@ -55,9 +55,9 @@
5555
"sirv": "^1.0.19",
5656
"ts-jest": "^27.1.2",
5757
"ts-node": "^10.4.0",
58-
"typescript": "~4.4.4",
58+
"typescript": "~4.5.4",
5959
"vite": "workspace:*",
60-
"vitepress": "^0.20.9",
60+
"vitepress": "^0.20.10",
6161
"yorkie": "^2.0.0"
6262
},
6363
"gitHooks": {
@@ -75,7 +75,7 @@
7575
"eslint --ext .ts"
7676
]
7777
},
78-
"packageManager": "[email protected].1",
78+
"packageManager": "[email protected].4",
7979
"pnpm": {
8080
"overrides": {
8181
"vite": "workspace:*",

packages/create-vite/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"homepage": "https://github.com/vitejs/vite/tree/main/packages/create-vite#readme",
3131
"dependencies": {
32-
"kolorist": "^1.5.0",
32+
"kolorist": "^1.5.1",
3333
"minimist": "^1.2.5",
3434
"prompts": "^2.4.2"
3535
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
110
node_modules
2-
.DS_Store
311
dist
4-
types
12+
dist-ssr
513
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

packages/create-vite/template-lit-ts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
},
2020
"devDependencies": {
2121
"vite": "^2.7.2",
22-
"typescript": "^4.4.4"
22+
"typescript": "^4.5.4"
2323
}
2424
}
+21-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
110
node_modules
2-
.DS_Store
311
dist
4-
types
12+
dist-ssr
513
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
110
node_modules
2-
.DS_Store
311
dist
412
dist-ssr
513
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

packages/create-vite/template-preact-ts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"devDependencies": {
1313
"@preact/preset-vite": "^2.1.5",
14-
"typescript": "^4.4.4",
14+
"typescript": "^4.5.4",
1515
"vite": "^2.7.2"
1616
}
1717
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
110
node_modules
2-
.DS_Store
311
dist
412
dist-ssr
513
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
110
node_modules
2-
.DS_Store
311
dist
412
dist-ssr
513
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

packages/create-vite/template-react-ts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@types/react": "^17.0.33",
1515
"@types/react-dom": "^17.0.10",
1616
"@vitejs/plugin-react": "^1.0.7",
17-
"typescript": "^4.4.4",
17+
"typescript": "^4.5.4",
1818
"vite": "^2.7.2"
1919
}
2020
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
110
node_modules
2-
.DS_Store
311
dist
412
dist-ssr
5-
*.local
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
/node_modules/
2-
/dist/
3-
/.vscode/
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
419
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

packages/create-vite/template-svelte-ts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"svelte-check": "^2.2.7",
1616
"svelte-preprocess": "^4.9.8",
1717
"tslib": "^2.3.1",
18-
"typescript": "^4.4.4",
18+
"typescript": "^4.5.4",
1919
"vite": "^2.7.2"
2020
}
2121
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
/node_modules/
2-
/dist/
3-
/.vscode/
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
419
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
110
node_modules
2-
.DS_Store
311
dist
412
dist-ssr
5-
*.local
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

0 commit comments

Comments
 (0)