Critical dependency: require function dependencies cannot be statically extracted
问题
VUE引用一个新的依赖后,编译打包时出现如下警告:
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
关键依赖:require函数的使用方式无法静态提取依赖项。
原因
webpack 在使用变量作为require路径时,打包出现 Critical dependencies 警告
解决
在webpack的module配置中增加如下设置,
unknownContextCritical: false,
Critical dependency: require function dependencies cannot be statically extracted相关推荐
- 修复Critical dependency: the request of a dependency is an expression警告
Critical dependency: the request of a dependency is an expression 关键依赖: 依赖关系的请求是一个表达式. 查看 问题代码: let ...
- Critical dependency: the request of a dependency is an expression
vue2项目 当你百分百确认你的代码没有任何问题时,但是powershell还是报了错误[Critical dependency: the request of a dependency is an ...
- OC和swift混合工程更新库时报:target has transitive dependencies that include statically linked binaries
OC和swift混合工程更新库时报:target has transitive dependencies that include statically linked binaries.有时间报的错误 ...
- 如何解决 Critical dependency: the request of a dependency is an expression ?
在使用若依后台时,在部分情况下会出现以下错误: 根据提示我们可以找到主要造成这个问题的代码是以下这段: export const loadView = (view) => { // 路由懒加载r ...
- Vue Cli webpack打包出现Waring :Critical dependency: the request of a dependency is an expression
错误信息: Waring 写法: let name = require(url); 如下写法,错误消失: let name = require(`${url}`);
- php 5.3 require,PHP5.3提示PHP Wrequire(./xx.php)arning: [function.require]: failed to open stream
由于我们一对一主机系统之前设置了严格的目录权限导致很多在PHP5.2下运行的程序转化到PHP5.3环境下会出现以下错误: PHP Warning: require(./forum.php) [fun ...
- Common Lisp 函数 require 和 provide 源代码分析
2019独角兽企业重金招聘Python工程师标准>>> Common Lisp 函数 require 和 provide 源代码分析 === 涉及文件: l1-files.lisp ...
- vue require css html,requirejs vue vue.router简单框架
index.html 入口页面html> vue `menu`.`name` base.js requirejs 配置文件(function(){ requirejs.config({ ...
- require.ensure与require AMD的区别
转载自 webpack: require.ensure与require AMD的区别 webpack: require.ensure与require AMD的区别 简介 require-ensure ...
- ensure函数_webpack的require.ensure()
注意:在webpack 2里面应该是不建议使用require.ensure()这个方法的.但是目前该方法仍然有效 webpack 在编译时,会静态地解析代码中的 require.ensure(),同时 ...
最新文章
- YOLO-v4目标检测实时手机端实现
- 【设计模式】软件设计七大原则 ( 依赖倒置原则 | 代码示例 )
- BOM字符(#8203;)转textNode对象
- 四渎《构建之法》——计划估计、敏捷流程、项目经理和用户场景
- python画平面直角坐标系_Python之OpenGL笔记(20):画平面直角坐标系
- [转]Terraform 使用 - 从最简单例子开始
- 看看虚函数表是什么样的
- HackerOne 平台诞生首个收入超200万美元的赏金猎人
- js弹出框、对话框、提示框、弹窗总结
- h5商城模板_“公众号+小程序”才是做微信商城的正确方式
- FPGA实现伪彩色图像
- 502——错误的网关
- HCIA~以太网链路聚合与交换机堆叠、集群
- 嵌入式准备 -- git、VSvode
- Arduino (一)——面包板与固定导线长度
- 业务流程图绘制方法经验谈(下篇)
- 【微服务】165:导入数据到索引库
- 安卓 每日一题 2020年5-6月问题及答案
- 三、SALV 添加自定义的状态栏
- jira中新增模块详解
热门文章
- zencart 1.5.1 英文原版 安装前和安装后目录文件的变换
- 分享CodeIgniter上传图片成功的全过程
- IOS 使用webview 显示 doc/docx/xls/pdf等
- BUG报告:habahaba风格,图片显示有问题
- linux 学习6 软件包管理 资料链接
- 在doPost,service等方法里配置字符编码过滤器,防止出现中文乱码
- 12.性能之巅 洞悉系统、企业与云计算 --- 基准测试
- 16.看板方法---三类改进机会
- 13.企业应用架构模式 --- 对象-关系元数据映射模式
- 7.Linux 的文件权限和目录配置