Ng-lazyload-image: NG9でprodビルドが機能しない

作成日 2020年06月15日  ·  2コメント  ·  ソース: tjoskar/ng-lazyload-image

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 9.1.8
Node: 12.10.0
OS: linux x64

Angular: 9.1.11
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: No

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.8
@angular-devkit/build-angular     0.901.8
@angular-devkit/build-optimizer   0.901.8
@angular-devkit/build-webpack     0.901.8
@angular-devkit/core              9.1.8
@angular-devkit/schematics        9.1.8
@angular/cdk                      9.2.4
@angular/cli                      9.1.8
@angular/http                     7.2.16
@angular/material                 9.2.4
@ngtools/webpack                  9.1.8
@schematics/angular               9.1.8
@schematics/update                0.901.8
rxjs                              6.5.5
typescript                        3.9.5
webpack                           4.42.0

ng-lazyload-imageバージョン:^ 8.0.1

'AppModule'のテンプレートコンパイル中にエラーが発生しました
'LazyLoadImageModule'のデコレータでは関数式はサポートされていません
'LazyLoadImageModule'には、.. / .. / .. / ng-lazyload-image / ng-lazyload-image.ts(22,23)のエラーが含まれています
関数式をエクスポートされた関数に変更することを検討してください。

全てのコメント2件

こんにちは、
追加してみてください:

"angularCompilerOptions": {
    "enableIvy": false
  }

tsconfig.jsontsconfig.app.json 、次のようになります。
tsconfig.json:

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "module": "esnext",
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2015",
    "lib": [
      "es2018",
      "dom"
    ]
  },
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true,
    "enableIvy": false
  }
}

tsconfig.app.json:

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./out-tsc/app",
    "types": []
  },
  "files": [
    "src/main.ts",
    "src/polyfills.ts"
  ],
  "include": [
    "src/**/*.d.ts"
  ],
  "angularCompilerOptions": {
    "enableIvy": false
  }
}

これは#463の複製のように見えます

このページは役に立ちましたか?
0 / 5 - 0 評価