问题
Angular 7 application not working on internet explorer. It says invalid character in vendor.js
I have already apply polyfills.ts changes but it still not working.
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"
]
}
}
solved
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.
回答1:
It looks like back-ticks are used at that line and IE11 doesn't support it. To make it work you will have to transpile your code with Babel.
回答2:
It's because you must have used ` template string (button below the Esc), IE 11 does not support it. You should have to use " or ' for your strings
More info
https://caniuse.com/#search=string
回答3:
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.
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
来源:https://stackoverflow.com/questions/57425517/internet-explorer-says-invalid-character-in-vendor-js