Internet Explorer说"vendor.js中的无效字符"(`) [英] Internet Explorer says 'Invalid character in vendor.js' ( ` )

查看:94
本文介绍了Internet Explorer说"vendor.js中的无效字符"(`)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Angular 7应用程序无法在Internet Explorer上运行.它显示了vendor.js中的无效字符

Angular 7 application not working on internet explorer. It says invalid character in vendor.js

我已经应用了polyfills.ts更改,但仍然无法正常工作.

I have already apply polyfills.ts changes but it still not working.

我的tsconfig.json =>

my tsconfig.json =>

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "module": "es2015",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ]
  }
}

已解决

我找到了一个模块"identicons",其中包含反引号,并将其从项目中删除,问题得以解决.谢谢大家的帮助.

I found a module 'identicons' which containing back-ticks and removed it from the project and the problem solved. Thank you all for your helps guys.

推荐答案

您将打字稿作为目标 es5 ,因此您自己的源代码内部没有任何错误,因为它将正常转换引号.

You have as target es5 for your typescript, so there is nothing wrong inside your own source code, because it will transpile to normal quotes.

错误也来自 vendor.js .这意味着您使用的是不支持IE11的自定义库.可能浏览错误所在的vendor.js会给您一个线索,找出导致该错误的库

Also the errors comes from vendor.js. This means that you are using a custom library which does not support IE11. Probably browsing the vendor.js where the error resides will give you a clue which library is causing it

这篇关于Internet Explorer说"vendor.js中的无效字符"(`)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆