使用vue-cli搭建的项目,启动报错

You are using the runtime-only build of Vue where the template compiler is not available.

解决方法

在vue.config.js文件中配置

const path = require("path");

module.exports = {
// webpack配置 - 简单配置方式
configureWebpack: {
resolve: {
alias: {
// 别名
vue$: "vue/dist/vue.esm.js", //加上这一句
"@api": path.resolve(__dirname, "./src/api"),
"@utils": path.resolve(__dirname, "./src/utils")
}
}
},
chainWebpack: config => {
// GraphQL Loader
config.module
.rule('html')
.test(/\.html$/)
.use('html-loader')
.loader('html-loader')
.tap(options => {
return options;
});
}
}

再次启动就OK了

You are using the runtime-only build of Vue where the template compiler is not available.的更多相关文章

  1. You are using the runtime-only build of Vue where the template compiler is not available. Either pre

    在升级脚手架到vue-cli3.0版本的时候出现了这个报错: [Vue warn]: You are using the runtime-only build of Vue where the tem ...

  2. You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

    异常 You are using the runtime-only build of Vue where the template compiler is not available. Either ...

  3. [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

    转载自:https://segmentfault.com/a/1190000006435886 解决办法:添加package.config.js配置文件中,添加本文章的红色部分代码 import vu ...

  4. [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available

    原文链接https://blog.csdn.net/xiaomajia029/article/details/88320233 问题描述: 原因分析:在项目配置的时候,默认 npm 包导出的是运行时构 ...

  5. Vue项目用了脚手架vue-cli3.0,会报错You are using the runtime-only build of Vue where the template compiler is not available.....

    摘自: https://blog.csdn.net/wxl1555/article/details/83187647 报错信息如下图: 报错原因是:vue有两种形式的代码:一种是compiler(模版 ...

  6. Vue Cli 报错:You are using the runtime-only build of Vue where the template compiler is not availabl

    报错原因: 这里引用的是vue.runtime.esm.js,造成的不能正常运行. vue-cli 2.x 解决方法: 在webpack.base.conf.js配置文件中多加了一段代码,将 vue/ ...

  7. vue.runtime.esm.js:593 [Vue warn]: Invalid prop: custom validator check failed for prop "value".报错解决

    在uni中使用 picker组件,一直报错 vue.runtime.esm.js:593 [Vue warn]: Invalid prop: custom validator check failed ...

  8. eclipse中build path 中JDK与java compiler compliance level的问题(转)

    roject facets做什么用? http://baike.baidu.com/view/6257360.htm,其实我感觉,就是让我们在创建项目时候,可以独立定义一个有一个模板供我们使用,在里面 ...

  9. WebStorm 使用webpack打包(build) Vue 静态资源无法访问(路径不对)问题

    在WebStorm中使用webpack打包 (命令npm run build) 后生成在项目的dist目录下,在浏览器打开,静态资源js.css等无法加载.因为打包时,资源使用了绝对路径. 解决: 打 ...

随机推荐

  1. 014-操作系统下验证下载文件的 MD5/SHA1/SHA256

    一.mac 1.md5 openssl md5 /path/to/file 新的macOS默认支持:md5 filename 2.sha256 openssl dgst -sha256 /path/t ...

  2. 每次开机后需要重新连接wifi才能上网

    这几天打开电脑后,每次都要重新连接wifi才能上网, 网上查到如下解决方法: 打开网络和共享中心->右键无线网络->配置->电源管理->允许计算机关闭此设备以节约电源(勾选去掉 ...

  3. Spring Cloud(6.1):搭建OAuth2 Authorization Server

    配置web.xml 添加spring-cloud-starter-security和spring-security-oauth2-autoconfigure两个依赖. </dependency& ...

  4. AJAX的个人见解

    ajax是什么? 在学习的过程中,我虽然在学习ajax但是对ajax的具体的意义不甚了解,对此我们就来看看什么ajax吧. Ajax的全称是:AsynchronousJavaScript+XML 2. ...

  5. android studio 开发中启动android项目报错sdk版本不一致解决方案

    安卓项目开发中新建项目后再run'的时候发现报错com.android.support:appcompat-v7依赖报错 查看下build.gredle所配置的参数: 打开项目的build.gradl ...

  6. ArcMap 制作广州 18 级地图切片需要多少时间?

    制作地图切片包会随着级别的上升,瓦片数量会指数级地上升,所需的计算时间也是指数级的. 但是 ArcMap 并不会提示时间信息,只有一个圈没完没了地转... 就在这无聊地等待中,我写了这篇帖子. 电脑配 ...

  7. shell脚本中set -e作用

    最近学习shell脚本想到一个问题,如果脚本中出现了一条异常语句,甚至可以影响整个脚本的使用,那么是否有一旦出现问题就可以及时停止的方法呢?在shell脚本中set命令就可以轻松实现.set命令的-e ...

  8. VS.vs15

    1.20190615 安装的 vs2015(cn_visual_studio_enterprise_2015_with_update_3_x86_x64_dvd_8923298.iso) 的目录为: ...

  9. EMR-LDAP配置

    usersync是负责在配置policy的时候可选用户有ldap里的用户,admin是负责登录webui的 https://cwiki.apache.org/confluence/display/RA ...

  10. Java虚拟机内存管理小结