一、配置vue.config.js

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  runtimeCompiler: true,
})

二、main.js

import { createApp } from 'vue'


 createApp({
    data() {
        return {
            count: 0
        }
    },
    template: `<div id="app">
    <button @click="count++">
      Count is: {{ count }}
    </button>
  </div>
  `
}).mount('#app')

三、访问localhost:8080