You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ If you want to use break point and explore code execution you can use the ["Run
24
24
25
25
2. Click on the "Run and Debug" icon in the activity bar of the editor.
26
26
27
-
3. Click on the "Javascript Debug Terminal" button.
27
+
3. Click on the "JavaScript Debug Terminal" button.
28
28
29
29
4. It will open a terminal, then go to `packages/playground/xxx` and run `pnpm run dev`.
30
30
@@ -229,7 +229,7 @@ The english docs are embedded in the main Vite repo, to allow contributors to wo
229
229
1. In order to get all doc files, you first need to clone this repo in your personal account.
230
230
2. Keep all the files in `docs/` and remove everything else.
231
231
232
-
- You should setup your translation site based on all the files in `docs/` folder as a Vitepress project.
232
+
- You should setup your translation site based on all the files in `docs/` folder as a VitePress project.
233
233
(that said, `package.json` is need).
234
234
235
235
- Refresh git history by removing `.git` and then `git init`
@@ -238,7 +238,7 @@ The english docs are embedded in the main Vite repo, to allow contributors to wo
238
238
239
239
- During this stage, you may be translating documents and synchronizing updates at the same time, but don't worry about that, it's very common in translation contribution.
240
240
241
-
4. Push your commits to your Github repo. you can setup a netlify preview as well.
242
-
5. Use [Ryu-cho](https://github.com/vuejs-translations/ryu-cho) tool to setup a Github Action, automatically track English docs update later.
241
+
4. Push your commits to your GitHub repo. you can setup a netlify preview as well.
242
+
5. Use [Ryu-cho](https://github.com/vuejs-translations/ryu-cho) tool to setup a GitHub Action, automatically track English docs update later.
243
243
244
244
We recommend talking with others in Vite Land so you find more contributors for your language to share the maintenance work. Once the translation is done, communicate it to the Vite team so the repo can be moved to the official vitejs org in GitHub.
Copy file name to clipboardexpand all lines: docs/blog/announcing-vite2.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The [programmatic API](https://vitejs.dev/guide/api-javascript.html) has also be
34
34
35
35
### esbuild Powered Dep Pre-Bundling
36
36
37
-
Since Vite is a native ESM dev server, it pre-bundles dependencies to reduce the number browser requests and handle CommonJS to ESM conversion. Previously Vite did this using Rollup, and in 2.0 it now uses `esbuild` which results in 10-100x faster dependency pre-bundling. As a reference, cold-booting a test app with heavy dependencies like React Material UI previously took 28 seconds on an M1-powered Macbook Pro and now takes ~1.5 seconds. Expect similar improvements if you are switching from a traditional bundler based setup.
37
+
Since Vite is a native ESM dev server, it pre-bundles dependencies to reduce the number browser requests and handle CommonJS to ESM conversion. Previously Vite did this using Rollup, and in 2.0 it now uses `esbuild` which results in 10-100x faster dependency pre-bundling. As a reference, cold-booting a test app with heavy dependencies like React Material UI previously took 28 seconds on an M1-powered MacBook Pro and now takes ~1.5 seconds. Expect similar improvements if you are switching from a traditional bundler based setup.
By default, ESBuild is applied to `ts`, `jsx` and `tsx` files. You can customize this with `esbuild.include` and `esbuild.exclude`, which can be a regex, a [picomatch](https://github.com/micromatch/picomatch#globbing-features) pattern, or an array of either.
371
+
By default, esbuild is applied to `ts`, `jsx` and `tsx` files. You can customize this with `esbuild.include` and `esbuild.exclude`, which can be a regex, a [picomatch](https://github.com/micromatch/picomatch#globbing-features) pattern, or an array of either.
372
372
373
-
In addition, you can also use `esbuild.jsxInject` to automatically inject JSX helper imports for every file transformed by ESBuild:
373
+
In addition, you can also use `esbuild.jsxInject` to automatically inject JSX helper imports for every file transformed by esbuild:
Set to `false` to disable minification, or specify the minifier to use. The default is [Esbuild](https://github.com/evanw/esbuild) which is 20 ~ 40x faster than terser and only 1 ~ 2% worse compression. [Benchmarks](https://github.com/privatenumber/minification-benchmarks)
852
+
Set to `false` to disable minification, or specify the minifier to use. The default is [esbuild](https://github.com/evanw/esbuild) which is 20 ~ 40x faster than terser and only 1 ~ 2% worse compression. [Benchmarks](https://github.com/privatenumber/minification-benchmarks)
853
853
854
854
Note the `build.minify` option is not available when using the `'es'` format in lib mode.
Copy file name to clipboardexpand all lines: docs/guide/api-javascript.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# JavaScript API
2
2
3
-
Vite's JavaScript APIs are fully typed, and it's recommended to use TypeScript or enable JS type checking in VSCode to leverage the intellisense and validation.
3
+
Vite's JavaScript APIs are fully typed, and it's recommended to use TypeScript or enable JS type checking in VS Code to leverage the intellisense and validation.
Copy file name to clipboardexpand all lines: docs/guide/why.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Vite improves the dev server start time by first dividing the modules in an appl
18
18
19
19
-**Dependencies** are mostly plain JavaScript that do not change often during development. Some large dependencies (e.g. component libraries with hundreds of modules) are also quite expensive to process. Dependencies may also be shipped in various module formats (e.g. ESM or CommonJS).
20
20
21
-
Vite [pre-bundles dependencies](./dep-pre-bundling) using [esbuild](https://esbuild.github.io/). Esbuild is written in Go and pre-bundles dependencies 10-100x faster than JavaScript-based bundlers.
21
+
Vite [pre-bundles dependencies](./dep-pre-bundling) using [esbuild](https://esbuild.github.io/). esbuild is written in Go and pre-bundles dependencies 10-100x faster than JavaScript-based bundlers.
22
22
23
23
-**Source code** often contains non-plain JavaScript that needs transforming (e.g. JSX, CSS or Vue/Svelte components), and will be edited very often. Also, not all source code needs to be loaded at the same time (e.g. with route-based code-splitting).
This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
3
+
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
12
12
13
-
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
14
-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
13
+
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
14
+
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
15
15
16
16
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).
0 commit comments