vue2 旧版学习记录 |
vue2 旧版问题
问题1 You are using the runtime-only build of Vue where the template compiler is not available. Either pre...
翻译:您使用的是Vue的runtime-only 构建方式,其中没有模板编译器。要么将模板预编译成渲染功能,要么使用包含编译器的生成。
主要原因是main.js文件引入的vue的问题
import Vue from 'vue'
import App from './App'
/*
el :index.html中的
components
template
*/
/* eslint-disable no-new */
new Vue({
el: '#app',
components: {
App
},
template: '<App/>'
})
修改:
webpack.base.conf.js :
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'@': resolve('src'),
'vue': 'vue/dist/vue.js' //20210317加上vue来源
}
},

参考博客:https://www.cnblogs.com/xiangxinhouse/p/8447507.html
静态服务器serve
//全局安装
npm i -g serve
//启动dist文件夹
serve dist

vue发布 动态web服务器(tomcat)

浙公网安备 33010602011771号