1.[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available
http://www.cnblogs.com/hanguidong/p/9416194.html
在vue-cli3.0中需要自己创建vue.config.js文件进行配置,vue.config.js 在项目的根目录下,目的是修改在引入vue时,不要采用runtime形式的文件,而采用 dist/vue.esm.js形式文件,将这段代码复制粘贴到vue,config.js中:
const path = require('path')
function resolve (dir) {
return path.join(__dirname,dir)
}
module.exports = {
configureWebpack: config => {
config.resolve = {
extensions: ['.js', '.vue', '.json',".css"],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
}
}
},
}