Installation
Vue.js can be installed in multiple ways depending on your use case. This guide covers all installation methods for Vue 3.5.29.Vue 3 requires Node.js version 20.0.0 or higher according to the
package.json engines field.Package Manager Installation
For building scalable applications, we recommend installing Vue with a package manager.Package Information
According topackages/vue/package.json, the official Vue package provides:
- Package name:
vue - Current version:
3.5.29 - Description: “The progressive JavaScript framework for building modern web UI.”
- Main entry:
index.js(CommonJS) - Module entry:
dist/vue.runtime.esm-bundler.js(ES modules) - Types:
dist/vue.d.ts(TypeScript definitions)
CDN Installation
For prototyping or learning, you can use Vue directly from a CDN without any build step.Using unpkg
Vue object:
Using jsDelivr
ES Module Build
For modern browsers with native ES module support:Distribution Files
Frompackages/vue/README.md, Vue provides different builds for different use cases:
Browser Builds
vue.global.js - Full build with compiler
vue.global.js - Full build with compiler
- For direct use via
<script src="..."> - Exposes the
Vueglobal object - Includes compiler for runtime template compilation
- Use
vue.global.prod.jsfor production (minified)
vue.runtime.global.js - Runtime only
vue.runtime.global.js - Runtime only
- For direct browser use
- Requires templates to be pre-compiled
- Smaller file size (no compiler)
- Use
vue.runtime.global.prod.jsfor production
vue.esm-browser.js - Native ES modules
vue.esm-browser.js - Native ES modules
- For native ES module imports in browsers
- Use with
<script type="module"> - Same compilation options as global build
- Use
vue.esm-browser.prod.jsfor production
Bundler Builds
vue.runtime.esm-bundler.js - Default for bundlers
vue.runtime.esm-bundler.js - Default for bundlers
- For webpack, Vite, Rollup, Parcel
- Runtime only (templates pre-compiled)
- Tree-shakeable with proper bundler config
- Default entry via
package.jsonmodule field
vue.esm-bundler.js - With compiler
vue.esm-bundler.js - With compiler
- Includes runtime template compiler
- Use for runtime template compilation
- Requires bundler alias configuration
- Larger bundle size (+14KB)
Server-Side Rendering
vue.cjs.js - Node.js CommonJS
vue.cjs.js - Node.js CommonJS
- For Node.js server-side rendering
- Uses
require()syntax - Auto-selects dev/prod based on
process.env.NODE_ENV - Used when bundling with
target: 'node'
TypeScript Support
Vue 3 is written in TypeScript and provides first-class TypeScript support.packages/vue/package.json:104-110, TypeScript is an optional peer dependency:
Browser DevTools
For a better development experience, install the Vue DevTools browser extension:Chrome Extension
Install for Chrome, Edge, Brave
Firefox Addon
Install for Firefox
DevTools Features
- Inspect component hierarchy
- View and edit component state
- Track events and performance
- Time-travel debugging
- Route inspection (with Vue Router)
According to
packages/runtime-core/src/devtools.ts:24, DevTools integration is built into Vue’s runtime core with functions like devtoolsInitApp and devtoolsUnmountApp.Build Tool Setup
For production applications, use a build tool:Vite (Recommended)
create-vue scaffolding tool powered by Vite.
Vue CLI (Legacy)
Package Dependencies
Frompackages/vue/package.json:97-102, Vue core depends on these workspace packages:
vue, you get:
- @vue/shared - Shared utility functions
- @vue/compiler-dom - Template compiler for DOM
- @vue/runtime-dom - Runtime for DOM rendering
- @vue/compiler-sfc - Single-File Component compiler
- @vue/server-renderer - Server-side rendering support
Verification
Verify your installation:Start building
Follow the Quick Start guide to create your first app
Next Steps
Quick Start Guide
Learn how to create your first Vue application with step-by-step instructions