错误SCRIPT1002:语法错误vendor.bundle.js(8315,1),该行具有eval函数,在ie11中加载了angular 4 app

时间:2018-08-09 13:14:13

标签: angular internet-explorer-11

我已经搜索了解决方案github和Stackoverflow,但是没有找到任何有效的解决方案。 我有推荐的polyfills。 而且它在chrome中有效,但在ie11中无效。

添加package.json。有一些外部npm软件包,但不知道为什么它不能在IE中工作

{
   "name": "webapp",
   "version": "0.2.6",
   "license": "MIT",
    "scripts": {
      "ng": "ng",
      "config": "ts-node ./config/set-env.ts",
      "start": "npm run config && ng serve",
      "build": "npm run config && ng build",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e",
      "i18n": "ng-xi18n"
     },
      "private": true,
      "dependencies": {
      "@angular/animations": "^4.4.5",
      "@angular/cli": "^1.7.3",
      "@angular/common": "^4.4.5",
      "@angular/compiler": "^4.4.5",
      "@angular/compiler-cli": "^4.4.5",
      "@angular/core": "^4.4.5",
      "@angular/forms": "^4.4.5",
      "@angular/http": "^4.4.5",
      "@angular/platform-browser": "^4.4.5",
      "@angular/platform-browser-dynamic": "^4.4.5",
      "@angular/platform-server": "^4.4.4",
      "@angular/router": "^4.4.5",
      "@pa-util/angular2-idam": "^1.5.3",
      "@types/node": "^6.0.95",
      "angular2-logger": "^0.6.0",
      "array-unique": "^0.3.2",
      "bpmn-js": "^0.19.0",
      "bpmn-js-properties-panel": "^0.11.2",
      "bulma": "^0.5.3",
      "chart.js": "^2.7.2",
      "classlist.js": "^1.1.20150312",
      "copy-webpack-plugin": "4.3.0",
      "core-js": "^2.4.1",
      "font-awesome": "^4.7.0",
      "jquery": "^3.2.1",
      "mydatepicker": "^2.6.2",
      "ng-gapi": "0.0.45",
      "ng2-charts": "^1.6.0",
      "ng2-pagination": "^2.0.2",
      "ng2-popover": "0.0.14",
      "ng2-toastr": "^4.1.2",
      "ngx-cookie-service": "^1.0.10",
      "rxjs": "^5.5.6",
      "web-animations-js": "^2.3.1",
      "zone.js": "^0.8.14"
   },
      "devDependencies": {
      "@angular/cli": "1.4.4",
      "@angular/compiler-cli": "^4.2.4",
      "@angular/language-service": "^4.2.4",
      "@types/jasmine": "~2.5.53",
      "@types/jasminewd2": "~2.0.2",
      "@types/jquery": "^3.2.15",
      "@types/node": "^6.0.90",
      "codelyzer": "~3.2.0",
      "fs": "0.0.1-security",
      "jasmine-core": "~2.6.2",
      "jasmine-spec-reporter": "~4.1.0", 
       "karma": "~1.7.0",
       "karma-chrome-launcher": "~2.1.1",
       "karma-cli": "~1.0.1",
       "karma-coverage-istanbul-reporter": "^1.2.1",
       "karma-jasmine": "~1.1.0",
       "karma-jasmine-html-reporter": "^0.2.2",
       "node-sass": "^4.5.3",
       "protractor": "~5.1.2",
       "ts-node": "^3.2.2",
       "tslint": "~5.7.0",
       "typescript": "~2.3.3",
       "angular2-template-loader": "^0.4.0",
       "awesome-typescript-loader": "^2.2.4",
       "css-loader": "^0.23.1",
       "file-loader": "^0.8.5",
       "html-loader": "^0.4.3",
       "less": "^2.7.2",
       "less-loader": "^2.2.3",
       "null-loader": "^0.1.1",
       "phantomjs-prebuilt": "^2.1.7",
       "raw-loader": "^0.5.1",
       "rimraf": "^2.5.2",
       "style-loader": "^0.13.1",
       "to-string-loader": "^1.1.5"
   }
}

如果在ie11中执行这些外部软件包时出现问题,将继续在github上搜索所使用的外部软件包

从控制台添加摘录 控制台错误 SCRIPT1002:语法错误 vendor.bundle.js(8315,1)

eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true 
 });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 
 \"Ng2MultiSelectDropDownModule\", function() { return 
 Ng2MultiSelectDropDownModule; });\n/* harmony export (binding) */ 
 __webpack_require__.d .............

0 个答案:

没有答案