Put in order · Vue.js course · Module 1: Vue and Vite

Advanced: Vite build stages

Arrange the stages of the Vite build process from source code to production:

Items to put in order

  • The output files go to the /dist directory
  • Vite reads index.html and finds the entry script (main.js)
  • Rolldown bundles the modules into chunks, removes unused code and minifies
  • Rolldown loads the modules: the Vue plugin compiles .vue files, Oxc turns TypeScript/JSX into JavaScript
Show the answer

Correct order:

  1. Vite reads index.html and finds the entry script (main.js)
  2. Rolldown loads the modules: the Vue plugin compiles .vue files, Oxc turns TypeScript/JSX into JavaScript
  3. Rolldown bundles the modules into chunks, removes unused code and minifies
  4. The output files go to the /dist directory