35
loading...
This website collects cookies to deliver better user experience
Vite (French word for "fast", pronounced /vit/) is a build tool that aims to provide a faster and leaner development experience for modern web projects.
esbuild
. package.json
/ package-lock.json
/ yarn.lock
/ pnpm-lock.yaml
and will rebuild the dependency. In case there are some issues you can delete the cache folder node_modules/.vite
or rerun the server with the --force
flag and Vite will rebuild all the dependencies.index.html
file, we'll see this line:<script type="module" src="/src/main.js"></script>
type="module"
attribute is an ES6 feature that is using native ES modules. All the modern browsers are already supporting this feature. main.js
and importing all the modules down the modules tree. And as you can see each vue component and dependency is being split in a separate module.app.js
containing all the components of the application. chunk-vendors.js
is basically all the node_modules
dependencies.app.js
will be re-bundled and sent to the browser.app.js
's size and the time it takes.<style>
of a component - then only the <style>
of that component will be replaced by HMR and not the whole component. Even though native ESM is now widely supported, shipping unbundled ESM in production is still inefficient (even with HTTP/2) due to the additional network round trips caused by nested imports.