Angular 4 build --prod包有错误

时间:2018-05-15 09:31:38

标签: angular angular-cli

构建我的Angular 4应用程序后出现问题。在供应商文件中,我在这一行有错误:

我使用的IDE是VSCode,并且在'function t'中有't'的提示: “[js]这个构造函数可以转换为类声明”

我尝试使用build build with build-optimizer = false,更新了angular-cli,并尝试了很多东西,但仍然没有。

function t(t, e, n) {
  this.routeReuseStrategy = t, this.futureState = e, this.currState = n
}

我的package.json看起来像这样:

"scripts": {
    "ng": "ng",
    "start": "ng serve -port 8002 --proxy-config proxy.conf.js",
    "build": "ng build --aot false --prod && node bundled.conf.js --build-optimizer false"
  },
  "dependencies": {
    "@angular/animations": "4.4.4",
    "@angular/cdk": "2.0.0-beta.10",
    "@angular/common": "4.4.4",
    "@angular/compiler": "4.4.4",
    "@angular/core": "4.4.4",
    "@angular/forms": "4.4.4",
    "@angular/http": "4.4.4",
    "@angular/material": "2.0.0-beta.10",
    "@angular/platform-browser": "4.4.4",
    "@angular/platform-browser-dynamic": "4.4.4",
    "@angular/platform-server": "4.4.4",
    "@angular/router": "4.4.4",
    "bootstrap": "4.0.0-beta",
    "core-js": "2.5.1",
    "date-fns": "2.0.0-alpha.6",
    "ie-shim": "0.1.0",
    "node-sass": "4.8.3",
    "rxjs": "5.4.3",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@angular/cli": "^1.6.2",
    "@angular/compiler-cli": "4.4.4",
    "@types/bootstrap": "3.3.36",
    "@types/node": "8.0.31",
    "concat-files": "0.1.1",
    "glob": "7.1.2",
    "foreach": "2.0.5",
    "https-proxy-agent": "2.1.0",
    "typescript": "2.4.2"
  },

0 个答案:

没有答案