It resolves that references your JavaScript source code. Vite treats index.html as source code and part of the module graph. This is intentional: during development Vite is a server, and index.html is the entry point to your application.
One thing you may have noticed is that in a Vite project, index.html is front-and-central instead of being tucked away inside public. Npx degit user/project #main my-project index.html and Project Root # Legacy browsers can be supported via the official - see the Building for Production section for more details.
You can learn more about the rationale behind the project in the Why Vite section. Vite is opinionated and comes with sensible defaults out of the box, but is also highly extensible via its Plugin API and JavaScript API with full typing support. It consists of two major parts:Ī dev server that provides rich feature enhancements over native ES modules, for example extremely fast Hot Module Replacement (HMR).Ī build command that bundles your code with Rollup, pre-configured to output highly optimized static assets for production.
Vite (French word for 'quick', pronounced /vit/, like 'veet') is a build tool that aims to provide a faster and leaner development experience for modern web projects.