Vue

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

December 3, 2025

download ready
Thank You
Your submission has been received.
We will be in touch and contact you soon!

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 ?

Work with our skilled vue developers to accelerate your project and boost its performance.
**Hire now**Hire Now**Hire Now**Hire now**Hire now

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

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