
Getting Started | Vite
See create-vite for more details on each supported template: vanilla, vanilla-ts, vue, vue-ts, react, react-ts, preact, preact-ts, lit, lit-ts, svelte, svelte-ts. Community Templates # create-vite is a tool to quickly start a project from a basic template for popular frameworks.
Features | Vite - v2.vitejs.dev
Vite uses 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. Use the Type-Only Imports and Export syntax to avoid potential problems like type-only …
Vite | Next Generation Frontend Tooling
Vite. Next Generation Frontend Tooling. Get ready for a development environment that can finally catch up with you.
Vite
Out-of-the-box support for TypeScript, JSX, CSS and more. 📦 Optimized Build. Pre-configured Rollup build with multi-page and library mode support. 🔩 Universal Plugins. Rollup-superset plugin interface shared between dev and build. 🔑 Fully Typed APIs. Flexible programmatic APIs with full TypeScript typing.
功能 | Vite 官方中文文档
Vite 启动模板默认情况下会设置 "skipLibCheck": "true",以避免对依赖项进行类型检查,因为它们可能只支持特定版本和配置的 TypeScript。 你可以在 vuejs/vue-cli#5688 了解更多信息。
Vite | Next Generation Frontend Tooling
Vite. Next Generation Frontend Tooling. Get ready for a development environment that can finally catch up with you.
Features | Vite
Vite uses 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. Use the Type-Only Imports and Export syntax to avoid potential problems like type-only …
Configuring Vite | Vite
For TypeScript users, make sure to add the type declarations in the env.d.ts or vite-env.d.ts file to get type checks and Intellisense. Example: // vite-env.d.ts declare const __APP_VERSION__ : string
Env Variables and Modes | Vite - v2.vitejs.dev
By default, Vite provides type definition for import. meta.env in vite/client.d.ts. While you can define more custom env variables in .env.[mode] files, you may want to get TypeScript IntelliSense for user-defined env variables which prefixed with VITE_ .
开始 | Vite 官方中文文档
执行 vite 命令会以当前工作目录作为根目录启动开发服务器。你也可以通过 vite serve some/sub/dir 来指定一个不同的根目录。 需要注意的是,Vite 也会在项目的根目录中寻找 它的配置文件(即 vite.config.js),所以如果更改了根目录,你需要将配置文件一起移动过去。