Skip to content

ng serve --prod Cannot use [chunkhash] or [contenthash] #10411

Closed
@alan-agius4

Description

@alan-agius4

Versions

Angular CLI: 6.0.0-rc.5
Node: 8.9.1
OS: win32 x64
Angular: 6.0.0-rc.5
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.5.7
@angular-devkit/build-angular     0.5.7
@angular-devkit/build-optimizer   0.5.7
@angular-devkit/core              0.5.7
@angular-devkit/schematics        0.5.7
@ngtools/json-schema              1.2.0
@ngtools/webpack                  6.0.0-rc.5
@schematics/angular               0.5.7
@schematics/update                0.5.7
rxjs                              6.0.0-uncanny-rc.7
typescript                        2.7.2
webpack                           4.5.0

Repro steps

  • Set "hmr": true under serve options
  • ng serve --prod

Observed behavior

****************************************************************************************

Date: 2018-04-20T11:18:32.210Z
Hash: 479da56e19191460642b
Time: 25039ms
chunk {0} admin-admin-module-ngfactory.2293166986b2fdeaaf9e.js (admin-admin-module-ngfactory) 811 bytes  [rendered]
chunk {1}  (runtime) [entry] [rendered]
chunk {2} styles.34c57ab7888ec1573f9c.css (styles) 0 bytes [initial] [rendered]
chunk {3} polyfills.fbe8aa029ddbd67561f0.js (polyfills) 59.4 kB [initial] [rendered]
chunk {4} main.272e4975a98129fc0e4c.js (main) 382 kB [initial] [rendered]

ERROR in chunk runtime [entry]
[name].[chunkhash:20].js
Cannot use [chunkhash] or [contenthash] for chunk in '[name].[chunkhash:20].js' (use [hash] instead)

Desired behavior

No error

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions