How Vite Changes the Game for Vue and Web Developers

Rate this content
Bookmark

In this talk you will learn what Vite is, why it is so great, and why you want to use it ASAP. You will also learn how to use Vite with Vue.js or React, and what Vitepress is and how to use it.

Alex Kyriakidis, founder of Vue School, will also answer the most frequently asked questions around Vite, including production use, Vite and test runners, what it means for Nuxt, and many more.

FAQ

Vue School is the first training platform for Vue.js, founded in 2016. It provides over 500 video lessons, many of which are available for free, including all fundamental courses.

Vue School offers video courses, tutorials, and workshops, which are available both in person and online. Workshops are designed to be intensive, hands-on, and can typically be completed in a day or two.

Vue School provides consulting and development services for companies, specializing in improving performance and fixing bugs.

Vite is a front-end build tool designed to improve the development experience by making it faster. It consists of a dev server and a build command, leveraging modern technologies like ESBuild and Rollup to enhance speed and efficiency.

Vite's dev server uses the browser's native ES modules feature, allowing code to be served directly without bundling. This setup starts the server in less than 300 milliseconds and supports hot module replacement in less than 100 milliseconds.

Yes, Vite is framework agnostic and can be used with various JavaScript frameworks like React, Preact, Svelte, and more. It provides a fast development environment regardless of the framework used.

VitePress is a static site generator built on top of Vite, designed for creating fast and lightweight documentation and blogs. It is not limited to Vite projects and can be integrated into any JavaScript project.

Yes, Vite is ready for production. The stable version, Vite 2.0, was released in February 2021 and includes features that support both modern and legacy browsers.

It is likely that Vite will be integrated into Vue CLI as its underlying build tool, replacing the current Webpack setup in the future.

Alex Kyriakidis
Alex Kyriakidis
22 min
21 Oct, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Vue School offers free training material, workshops, and consulting services. Vite is a game-changer for Vue and web development, significantly improving the development experience. It leverages the browser's native ES modules feature and uses ESBuild. Vite's dev server is much faster than other bundlers. Vite provides a blazing fast development environment for various frameworks and supports server-side rendering and static site generation. Vite is ready for production and likely to be used by Vue CLI in the future.

1. Introduction to Vue School and Vite

Short description:

Hello Vue London! I am Alex Kyriakides, the author of The Majesty of Vue.js. I have contributed to Vue.js and founded Vue School. We offer free training material, workshops, and consulting services to improve performance and fix bugs.

Hello Vue London! I hope you're enjoying the conference. I am Alex Kyriakides. I'm the author of the first book on Vue.js called The Majesty of Vue.js which I wrote when Vue.js was version 0.something. And over the years I have contributed to Vue.js and the ecosystem. And I'm the founder and teacher at Vue School. I'm based in Amsterdam and you can find me on Twitter and GitHub under the username of hoodlicks.

Vue School is the first training platform for Vue.js. We started back in 2016. And we have over 500 video lessons. And since we offer a lot of training material for free, we have all the fundamental courses for free. We have over 120,000 registered users. And these amazing people that you see here, they work with Vue School either as instructors and teachers or as contributors. At Vue School, besides video courses and tutorials, we do workshops, which are either in person or online in our virtual classroom. And workshops is a great form of training for learning something, a new technology or a new topic, very quickly, typically in a day or two. And all our workshops are live, intensive and hands-on. For companies, we help them by providing consulting and development services. And we are particularly good with helping improving performance and with fixing nasty bugs. So, if you need any help with that, feel free to let us know.

2. Vite: A Game-Changer for Vue and Web Development

Short description:

Today, I will talk about how Vite changes the game for Vue and web development. Vite is a new front-end build tool that significantly improves the development experience. It consists of a dev server that saves code directly in the browser, making it incredibly fast. Vite leverages the browser's native ES modules feature and uses ESBuild for features not yet supported by modern browsers.

Now, today, I am going to speak to you about how Vite changes the game for Vue and web development. In this talk, I will cover what is Vite, why Vite is so great and why all the fuzz, how to use Vite with Vue or even React, what is VitePress, and in the end of the talk, I will answer some of the frequently asked questions, like, for example, what's happening with Vite and Nuxt.js. If you are interested in the technical insights, check out this excellent talk by Evan Yu from Vue Toronto. Here he covers a lot of information on how Vite is built, why it is built this way, why they made it. It's a very interesting talk. I definitely recommend checking it out.

OK, so let's get started with what is Vite. Vite is a new front-end build tool that significantly improves the front-end development experience. And what is Vite's goal? It is to make developers more productive. And how do you make developers more productive? By making developers happier. And how do you make developers happier? By making their tools faster. That is a quote from Evan Hugh, the creator of Vite. But, OK, what is Vite exactly? Vite is a command line tool that consists of two parts, a dev server and a build command that bundles your code with Rollup for production. The dev server is the tool that you use while you're developing your application. And as you understand, the build command is what you run when you are ready to ship it.

Let's learn more about Vite's dev server. Now, while you develop with Vite, your code is saved in your browser directly without being bundled. And that's what makes the Vite dev server so fast. It is like opening your local files from your computer in your browser. To understand how Vite's dev server look like, think of it as UCLI, but way faster. When we say way faster, we really mean it. The Vite dev server starts in less than 300 milliseconds, and the hot module replacement takes place in less than 100 milliseconds. And Vite achieves that by leveraging the browser's native ES modules feature. In this image, you can see that all the major browsers, here, they support ES modules in their latest version. And this is also one of the reasons that we get an awesome tool like Vite today and not like a few years back, because we needed to wait for modern browsers to evolve and support features like this one in order to make our developer experience faster and nicer. Now, for features that Vite needs, but modern browsers don't support yet, Vite uses a tool called ESBuild. And it uses ESBuild for supporting bare imports, for implementing the hot module replacement, and for having support for tools like Typescript or JSX. I didn't know of ESBuild before I look into the Vite Dev server, and I figured that it is written in Go and it compiles to native code. And that it uses parallelism heavily. And I found this benchmark very interesting, and you can see here that ESBuild is able to bundle or to compile a large JavaScript code base in 0.3 minutes, a JavaScript code base in 0.37 seconds.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Vite: Rethinking Frontend Tooling
JSNation Live 2021JSNation Live 2021
31 min
Vite: Rethinking Frontend Tooling
Top Content
Vite is a new build tool that intends to provide a leaner, faster, and more friction-less workflow for building modern web apps. This talk will dive into the project's background, rationale, technical details and design decisions: what problem does it solve, what makes it fast, and how does it fit into the JS tooling landscape.
Everything Beyond State Management in Stores with Pinia
Vue.js London Live 2021Vue.js London Live 2021
34 min
Everything Beyond State Management in Stores with Pinia
Top Content
When we think about Vuex, Pinia, or stores in general we often think about state management and the Flux patterns but not only do stores not always follow the Flux pattern, there is so much more about stores that make them worth using! Plugins, Devtools, server-side rendering, TypeScript integrations... Let's dive into everything beyond state management with Pinia with practical examples about plugins and Devtools to get the most out of your stores.
Welcome to Nuxt 3
Vue.js London Live 2021Vue.js London Live 2021
29 min
Welcome to Nuxt 3
Top Content
Explain about NuxtJS codebase refactor and challenges facing to implement Vue 3, Vite and other packages.
One Year Into Vue 3
Vue.js London Live 2021Vue.js London Live 2021
20 min
One Year Into Vue 3
Top Content
Vue 3 may still sound new to many users, but it's actually been released for over a year already. How did Vue 3 evolve during this period? Why did it take so long for the ecosystem to catch up? What did we learn from this process? What's coming next? We will discuss these questions in this talk!
Utilising Rust from Vue with WebAssembly
Vue.js London Live 2021Vue.js London Live 2021
8 min
Utilising Rust from Vue with WebAssembly
Top Content
Rust is a new language for writing high-performance code, that can be compiled to WebAssembly, and run within the browser. In this talk you will be taken through how you can integrate Rust, within a Vue application, in a way that's painless and easy. With examples on how to interact with Rust from JavaScript, and some of the gotchas to be aware of.
Vue: Feature Updates
Vue.js London 2023Vue.js London 2023
44 min
Vue: Feature Updates
Top Content
The creator of Vue js gives an update on the new features of the technology.

Workshops on related topic

Vue3: Modern Frontend App Development
Vue.js London Live 2021Vue.js London Live 2021
169 min
Vue3: Modern Frontend App Development
Top Content
Featured WorkshopFree
Mikhail Kuznetcov
Mikhail Kuznetcov
The Vue3 has been released in mid-2020. Besides many improvements and optimizations, the main feature of Vue3 brings is the Composition API – a new way to write and reuse reactive code. Let's learn more about how to use Composition API efficiently.

Besides core Vue3 features we'll explain examples of how to use popular libraries with Vue3.

Table of contents:
- Introduction to Vue3
- Composition API
- Core libraries
- Vue3 ecosystem

Prerequisites:
IDE of choice (Inellij or VSC) installed
Nodejs + NPM
Using Nitro – Building an App with the Latest Nuxt Rendering Engine
Vue.js London Live 2021Vue.js London Live 2021
117 min
Using Nitro – Building an App with the Latest Nuxt Rendering Engine
Top Content
Workshop
Daniel Roe
Daniel Roe
We'll build a Nuxt project together from scratch using Nitro, the new Nuxt rendering engine, and Nuxt Bridge. We'll explore some of the ways that you can use and deploy Nitro, whilst building a application together with some of the real-world constraints you'd face when deploying an app for your enterprise. Along the way, fire your questions at me and I'll do my best to answer them.
Going on an adventure with Nuxt 3, Motion UI and Azure
JSNation 2022JSNation 2022
141 min
Going on an adventure with Nuxt 3, Motion UI and Azure
WorkshopFree
Melanie de Leeuw
Melanie de Leeuw
We love easily created and deployed web applications! So, let’s see what a very current tech stack like Nuxt 3, Motion UI and Azure Static Web Apps can do for us. It could very well be a golden trio in modern day web development. Or it could be a fire pit of bugs and errors. Either way it will be a learning adventure for us all. Nuxt 3 has been released just a few months ago, and we cannot wait any longer to explore its new features like its acceptance of Vue 3 and the Nitro Engine. We add a bit of pizzazz to our application with the Sass library Motion UI, because static design is out, and animations are in again.Our driving power of the stack will be Azure. Azure static web apps are new, close to production and a nifty and quick way for developers to deploy their websites. So of course, we must try this out.With some sprinkled Azure Functions on top, we will explore what web development in 2022 can do.
TresJS create 3D experiences declaratively with Vue Components
Vue.js London 2023Vue.js London 2023
137 min
TresJS create 3D experiences declaratively with Vue Components
Workshop
Alvaro Saburido
Alvaro Saburido
- Intro 3D - Intro WebGL- ThreeJS- Why TresJS- Installation or Stackblitz setup - Core Basics- Setting up the Canvas- Scene- Camera- Adding an object- Geometries- Arguments- Props- Slots- The Loop- UseRenderLoop composable- Before and After rendering callbacks- Basic Animations- Materials- Basic Material- Normal Material- Toon Material- Lambert Material- Standard and Physical Material- Metalness, roughness - Lights- AmbientLight- DirectionalLight- PointLights- Shadows- Textures- Loading textures with useTextures- Tips and tricks- Misc- Orbit Controls- Loading models with Cientos- Debugging your scene- Performance
Building Vue forms with VeeValidate
Vue.js London Live 2021Vue.js London Live 2021
176 min
Building Vue forms with VeeValidate
Workshop
Abdelrahman Awad
Abdelrahman Awad
In this workshop, you will learn how to use vee-validate to handle form validation, manage form values and handle submissions effectively. We will start from the basics with a simple login form all the way to using the composition API and building repeatable and multistep forms.

Table of contents:
- Introduction to vee-validate
- Building a basic form with vee-validate components
- Handling validation and form submissions
- Building validatable input components with the composition API
- Field Arrays and repeatable inputs
- Building a multistep form
Prerequisites:
VSCode setup and an empty Vite + Vue project.
Building full-stack GraphQL applications with Hasura and Vue 3
Vue.js London Live 2021Vue.js London Live 2021
115 min
Building full-stack GraphQL applications with Hasura and Vue 3
WorkshopFree
Gavin Ray
Gavin Ray
The frontend ecosystem moves at a breakneck pace. This workshop is intended to equip participants with an understanding of the state of the Vue 3 + GraphQL ecosystem, exploring that ecosystem – hands on, and through the lens of full-stack application development.

Table of contents
- Participants will use Hasura to build out a realtime GraphQL API backed Postgres. Together we'll walk through consuming it from a frontend and making the front-end reactive, subscribed to data changes.
- Additionally, we will look at commonly-used tools in the Vue GraphQL stack (such as Apollo Client and Urql), discuss some lesser-known alternatives, and touch on problems frequently encountered when starting out.
- Multiple patterns for managing stateful data and their tradeoffs will be outlined during the workshop, and a basic implementation for each pattern discussed will be shown.
Workshop level

NOTE: No prior experience with GraphQL is necessary, but may be helpful to aid understanding. The fundamentals will be covered.