[vue-router] Failed to resolve async component default: Error: Loading chunk 0 failed.
在整合laravel5.4 和vue2.1的时候遇到一个奇怪的问题
Uncaught SyntaxError: Unexpected token <
Error: Loading chunk 0 failed.
at HTMLScriptElement.onScriptComplete (app.js:99)
[vue-router] Failed to resolve async component default: Error: Loading chunk 0 failed.
Error: Loading chunk 0 failed.
at HTMLScriptElement.onScriptComplete (app.js:99)

两个组件 一个能加载 一个报错,可能原因是不支持延迟加载Vue组件
解决方法是 laravel 5.4已经支持webpack
在 webpack.mix.js 中加上
output: {
publicPath: '/'
}
这个配置就可以了
[vue-router] Failed to resolve async component default: Error: Loading chunk 0 failed.的更多相关文章
- Vue-cli3.x在开发环境中(router采用 history模式)出现Failed to resolve async component default: Error: Loading chunk {/d} failed.或者Uncaught SyntaxError: Unexpected token <错误
使用Vue-cli3.x开发环境中(router采用 history模式)出现Failed to resolve async component default: Error: Loading chu ...
- 解决IE报错[vue router]Failed to resolve async component default:strict 模式下不允许分配到只读属性
之前遇到过一个奇怪的问题,在其他浏览器下一切正常,但在万恶的IE下,却一直不行. 具体问题场景就是:比如orderDetail页面出现问题,那么只要是路由跳转的,点第1次无法跳转,必须得点第2次才可以 ...
- VUE项目部署到线上生产环境,Loading chunk xxx failed
项目部署到生产环境,路由点击无效,报错 Loading chunk chunk-xxxxx failed.(missing xxxx) 加载失败,错误的路径. 话不多说,直接贴代码: vue.conf ...
- Failed to resolve com.android.support:support-compat:25.4.0
3down votefavorite I am trying to include this library to my project by adding compile 'jp.wasabee ...
- Vue项目中出现Loading chunk {n} failed问题的解决方法
最近有个Vue项目中会偶尔出现Loading chunk {n} failed的报错,报错来自于webpack进行code spilt之后某些bundle文件lazy loading失败.但是这个问题 ...
- 对于vue项目更新迭代导致上传至服务器后出现Loading chunk {n} failed和Unexpected token <的解决方式
相信大家对于vue项目的维护与更新中会遇见很多问题,其中有两种情况最为常见. 一种是Loading chunk {n} failed,这种情况出现的原因是vue页面更新上传至服务器后,由于vue默认打 ...
- Failed to resolve: com.android.support:design:25.4.0
韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha 错误:(27, 13) Failed to resolve: com.android.s ...
- Error:(27, 13) Failed to resolve: com.android.support.constraint:constraint-layout:1.0.2约束布局constraint-layout导入失败的解决方案
运行demo提示错误: Error:(27, 13) Failed to resolve: com.android.support.constraint:constraint-layout:1.0.2 ...
- Vue打包后放到服务器出现Loading chunk {n} failed 错误
导航栏点击切换时 会出现Loading chunk {n} failed ,刷新之后便不会出现.而且n在最新的build的文件中,n没有存在 偶然一次发现,项目更新迭代开发时上传测试环境后就会出现, ...
随机推荐
- 用node是踩过的一些坑
1.http.request抓取数据时,response的“data”回调事件返回的数据不完整 问题原因:因为“data"事件返回是chunk,就是说是一块块连续的数据 解决的办法:在”da ...
- linux学习笔记---学习总结②
table ----> 展示数据 table --->表格 border cellspacing cellpadding width height tr --->行 align th ...
- 08-Mysql数据库----完整性约束
总结: 1,not null 不能插入空,不设置可空 2,unique 单列唯一 create table department(name char(10) unique); ...
- windows本地连接腾讯云的mysql服务器
由于最近数据库需要用上Navicat作为数据库,但是我的mysql装在腾讯云的Ubuntu上,因此需要做些配置开放端口,和监听端口,因此略显麻烦,这里记录一下连接的具体步骤,方便以后又得装(flag) ...
- 分布式资源调度--YARN框架
YARN产生背景 YARN是Hadoop2.x才有的,所以在介绍YARN之前,我们先看一下MapReduce1.x时所存在的问题: 单点故障 节点压力大 不易扩展 MapReduce1.x时的架构如下 ...
- BZOJ 3597 SCOI2014 方伯伯送椰子 网络流分析+SPFA
原题链接:http://www.lydsy.com/JudgeOnline/problem.php?id=3597 Description 四川的方伯伯为了致富,决定引进海南的椰子树.方伯伯的椰子园十 ...
- Java 实现一个带提醒的定时器
定时闹钟预览版EXE下载链接:https://files.cnblogs.com/files/rekent/ReadytoRelax_jar.zip 功能说明: 实现了一个休息提醒器,用户首先设定一个 ...
- http长连接和短连接以及连接的本职
HTTP长连接和短连接原理浅析 本文主要讲了,http长连接本质是tcp的长连接. 网络通信过程中,建立连接的本质是什么? 连接的本质 建立连接这个词,是从早期的电话系统中来的,那个时候,“建立连接” ...
- Android Studio 添加模块依赖
原文地址: http://fanjiajia.cn/2018/09/27/Android%20Studio%20%E6%B7%BB%E5%8A%A0%E6%A8%A1%E5%9D%97%E4%BE%9 ...
- 修改CodeSmith中的SchemaExplorer.MySQLSchemaProvider
修改C:\Program Files (x86)\CodeSmith\v6.5\Samples\Projects\CSharp\MySQLSchemaProvider\MySQLSchemaProvi ...