角度误差块资产优化cleancss-webpack-plugin

时间:2019-01-18 00:52:14

标签: angular build command-line-interface

在此先感谢您的帮助。

我可以服务,也可以建造。 ng build-prod返回以下错误。我试图卸载cleancss并重新安装。 这是我当前的版本

Angular CLI: 7.2.2
Node: 8.9.3
OS: win32 x64
Angular: 7.2.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.12.2
@angular-devkit/build-angular     0.12.2
@angular-devkit/build-optimizer   0.12.2
@angular-devkit/build-webpack     0.12.2
@angular-devkit/core              7.2.2
@angular-devkit/schematics        7.2.2
@angular/cli                      7.2.2
@ngtools/webpack                  7.2.2
@schematics/angular               7.2.2
@schematics/update                0.12.2
rxjs                              6.3.3
typescript                        3.2.2
webpack                           4.28.4

PS C:\dev\cetevanV3\cetevan> ng build --prod
 92% chunk asset optimization cleancss-webpack-pluginC:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\optimizer\level-2\can-override.js:76
    return overrideCheckers[position](validator, value1, value2);
                                     ^

TypeError: overrideCheckers[position] is not a function
    at C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\optimizer\level-2\can-override.js:76:38
    at everyValuesPair (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\optimizer\level-2\properties\every-values-pair.js:20:10)
    at overridable (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\optimizer\level-2\properties\merge-into-shorthands.js:154:10)
    at invalidateOrCompact (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\optimizer\level-2\properties\merge-into-shorthands.js:85:10)
    at mergeIntoShorthands (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\optimizer\level-2\properties\merge-into-shorthands.js:44:5)
    at optimizeProperties (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\optimizer\level-2\properties\optimize.js:29:5)
    at recursivelyOptimizeProperties (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\optimizer\level-2\optimize.js:63:9)
    at level2Optimize (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\optimizer\level-2\optimize.js:77:3)
    at optimize (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\clean.js:147:5)
    at C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\clean.js:120:29
    at C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\reader\read-sources.js:26:64
    at loadOriginalSources (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\reader\load-original-sources.js:26:5)
    at C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\reader\read-sources.js:26:14
    at applySourceMaps (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\reader\apply-source-maps.js:34:5)
    at C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\reader\read-sources.js:25:12
    at fromStyles (C:\dev\cetevanV3\cetevan\node_modules\clean-css\lib\reader\read-sources.js:152:5)

0 个答案:

没有答案