Vue
Vue

How to install Vue 3.6 Vapor Mode in existing Vite projects?

December 3, 2025

Vue 3.6 Vapor Mode requires vue@next alpha and vaporInteropPlugin() for hybrid vDOM/Vapor setups. Add @vue/core-vapor alias in vite.config.ts and use <script setup vapor> in target components. Vite auto-detects .vapor.vue files for 2-3x render speed without full migration.

Example:-

Step 1:-Install Vue 3.6 alpha + Vapor dependencies

Code

npm install vue@next @vue/vapor@alpha
      

Step 2:-Update vite.config.ts with Vapor alias and plugin

Code

// vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      'vue/vapor': 'vue/dist/vue-vapor.esm.js'
    }
  }
})
      

Step 3:-Add vaporInteropPlugin to main.ts

Code

// main.ts
import { createApp } from 'vue'
import { vaporInteropPlugin } from 'vue/vapor'
import App from './App.vue'

createApp(App)
  .use(vaporInteropPlugin())
  .mount('#app')
      

Step 4:-Create Vapor components with .vapor.vue or vapor attribute

Code

<!-- Counter.vapor.vue -->
<script setup vapor>
import { ref } from 'vue/vapor'
const count = ref(0)
</script>

<template>
  <button @click="count++">{{ count }}</button>
</template>
      

Step 5:-Run dev server - Vite auto-detects Vapor files

Code

npm run dev
      
Hire Now!

Need Help with Vue Development ?

Ready to leverage the power of conversational AI? Start your project with Zignuts expert AI developers.
bg-image
download-image
Company Deck
PDF, 3MB
© 2026 Zignuts Technolab. All Rights Reserved.
branch imagesbranch imagesbranch imagesbranch imagesbranch imagesbranch images