使用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. 图解 HTTP 笔记(五)——Web 服务器

    该章的主要内容是讲解与 HTTP 协作的 Web 服务器 一.用单台虚拟主机实现多个域名 基于虚拟主机的功能,可以只使用一台物理机实现多个域名的网站部署. 在互联网上,域名通过 DNS 域名解析系统可 ...

  2. PAT 甲级 1030 Travel Plan (30 分)(dijstra,较简单,但要注意是从0到n-1)

    1030 Travel Plan (30 分)   A traveler's map gives the distances between cities along the highways, to ...

  3. Docker使用Portainer搭建可视化界面

    Portainer介绍 Portainer是Docker的图形化管理工具,提供状态显示面板.应用模板快速部署.容器镜像网络数据卷的基本操作(包括上传下载镜像,创建容器等操作).事件日志显示.容器控制台 ...

  4. python 实现对象去重

    利用set()方法实现对象去重,重写__hash__方法和__eq__方法告诉程序什么样的对象是同一个对象 # 写一个类 拥有100个对象 # 拥有三个属性 name age sex # 如果两个对象 ...

  5. 利用matlab自带函数快速提取二值图像的图像边缘 bwperim函数

      clear all;close all;clc; I = imread('rice.png'); I = im2bw(I); J = bwperim(I); % 提取二值图像图像边缘 figure ...

  6. DC-1靶机

    DC-1 靶机获取:http://www.five86.com/ 发现IP:arp-scan --interface=eth0 -localnet arp-scan -l 靶机IP:192.168.0 ...

  7. SIFT学习笔记之一 下载和调用

     下面给出了多个参考地址,挑个能用的吧: vs2010+Rob Hess SIFT: http://blog.csdn.net/lanbing510/article/details/8507341 R ...

  8. Java学习笔记-枚举类

    实例有限且固定的类成为枚举类 枚举类的实现 早期时候的实现形式: public static final int SEASON_SPRING = 1; public static final int ...

  9. eNSP——交换机基础配置

    原理: 交换机之间通过以太网电接口对接时需要协商一-些接口参数, 比如速率.双工模式等.交换机的全双工是指交换机在发送数据的同时也能够接收数据,两者同时进行.就如平时打电话一样,说话的同时也能够听到对 ...

  10. JS之ajax实现注册页,小文件传输

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...