Use of eval in “../../node_modules/.pnpm/vconsole@3.15.1/node_modules/vconsole/dist/vconsole.min.js

 Use of eval in "../../node_modules/.pnpm/vconsole@3.15.1/node_modules/vconsole/dist/vconsole.min.js" is strongly discouraged as it poses security risks and may cause issues with minification.

报错原因:vconsole里面使用了eval,这被认为是不安全的

解决方法:

<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
<script>
  // 初始化 vConsole
  var vConsole = new VConsole();
</script>

​或者  

if (import.meta.env.DEV) {
  // 动态导入vconsole
  import('vconsole').then((module) => {
    const VConsole = module.default;
    new VConsole();
  });
}

我在vue2中通过tinymce和tinymce-plugins 在plugins和toolbar中加入了importword 但是我的项目报错了 p is not a constructor TypeError: p is not a constructor at t (http://10.42.47.126:8080/tinymce/plugins/importword/plugin.min.js:751:178) at u (http://10.42.47.126:8080/tinymce/plugins/importword/plugin.min.js:752:145) at Object.onAction (http://10.42.47.126:8080/tinymce/plugins/importword/plugin.min.js:754:104) at eval (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:382090) at eval (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:255327) at eval (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:382010) at eval (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:51547) at each$1 (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:4119) at run (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:51509) at eval (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:64592) at eval (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:1678) at eval (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:313855) at Optional.fold (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:2068) at doTriggerHandler (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:313676) at doTriggerOnUntilStopped (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:314490) at triggerOnUntilStopped (webpack-internal:///./node_modules/_tinymce@6.6.0@tinymce/themes/silver/theme.js:3:315348) 这是什么原因
07-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值