How Vite Came to Be
Evan You
ViteConf 2022
âFrontend Toolingâ
<script src="app.js"></script>
<script src="app.js"></script>
<script src="module-a.js"></script>
<script src="module-b.js"></script>
;(function() {
var localVar = 1
window.App.foo = {
// ...
}
})()
IIFE (Immediately-Invoked Function Expression)
AMD / RequireJS
Node.js -> CommonJS
browserify / webpack
Vue Single-File Components (SFCs)
<script>
export default {
data() {
return {
count: 0
}
}
}
</script>
<template>
<button @click="count++">Count is: {{ count }}</button>
</template>
<style scoped>
button {
font-weight: bold;
}
</style>
browserify -> vueify
webpack -> vue-loader
Bundlers were too low-level for end users
vue-cli
2015: ES Modules
JavaScript finally gets a standardized module system
Rollup
2017: Native ESM in the browser
Familiar bundle-less development
but with modules!
What if Native ESM had a transform API?
â¦but people still want to use SFC, JSX, PostCSS, etcâ¦
March 2019
Transforms imports to Vue SFCs on the fly
Unresolved questions:
The tweet that started it allâ¦
Apr 21, 2020
Built in parallel:
The grind to 1.0
Aiming for feature parity with vue-cli
while fixing all kinds of bugs
Apr ~ Nov 2020 / 91 releases
â¦but Vite 1.0 never landed.
As I worked towards 1.0â¦ï¿½
I realized Vite can be much more than just a replacement of vue-cli.
1. Framework-agnostic,
minimal-config build tool
for end users
2. The shared tooling layer
for framework authors
Vite 2 was a complete rewrite
Started in this commit on Dec 7, 2020
Feb 16th 2021
Forming a Team
Discussion Mar 19, 2021
Building an Ecosystem
And a Community
Thank you!