Skip to content

How to enable runtime template compiler? #4158

Answered by tptech
Thomasan1999 asked this question in Q&A
Discussion options

You must be logged in to vote

SOLUTION

Okay … after more investigation, this configuration for vite.config.ts is working for me, and it's successfully including the runtime compiler:

import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';

// https://vitejs.dev/config/
export default defineConfig({
    resolve: {
        alias: {
            vue: 'vue/dist/vue.esm-bundler.js'
        }
    },
  plugins: [
      vue()
  ]
})

And this is my package.json:

{
  "name": "exp1",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vue-tsc --noEmit && vite build",
    "serve": "vite preview"
  },
  "dependencies": {
    "vue": "^3.2.6",
    "vue3-runtime-template": "^1.0.1"
  },
  "devDepen…

Replies: 5 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@s5b
Comment options

@Thomasan1999
Comment options

@pols63
Comment options

@bhenderson
Comment options

@fr1g
Comment options

Answer selected by Thomasan1999
Comment options

You must be logged in to vote
5 replies
@plweil
Comment options

@spectrachrome
Comment options

@gfonsecapilarte
Comment options

@danilo-zazz
Comment options

@fr1g
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet