angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.76k stars 11.97k forks source link

App broken after 12.0.0-next.9 - MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead #20544

Closed naveedahmed1 closed 3 years ago

naveedahmed1 commented 3 years ago

🐞 Bug report

Command (mark with an x)

Is this a regression?

Yes, the previous version in which this bug was not present was: 12.0.0-next.8. After upgrading to 12.0.0-next.9, the client app and server (ssr) app throws below error. `MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead` Although despite of this the `ng serve` command for `client` application does work, but `SSR` applications is broken. The server application throws below error in Chrome Dev Console and is broken: ``` ERROR Error: Uncaught (in promise): ChunkLoadError: Loading chunk default-node_modules_angular_cdk___ivy_ngcc___fesm2015_portal_js-node_modules_angular_cdk___i-50892a failed. (error: https://pagead2.googlesyndication.com/pagead/js/default-node_modules_angular_cdk___ivy_ngcc___fesm2015_portal_js-node_modules_angular_cdk___i-50892a.js) ChunkLoadError: Loading chunk default-node_modules_angular_cdk___ivy_ngcc___fesm2015_portal_js-node_modules_angular_cdk___i-50892a failed. (error: https://pagead2.googlesyndication.com/pagead/js/default-node_modules_angular_cdk___ivy_ngcc___fesm2015_portal_js-node_modules_angular_cdk___i-50892a.js) at Object.__webpack_require__.f.j (jsonp chunk loading:27) at ensure chunk:6 at Array.reduce () at Function.__webpack_require__.e (ensure chunk:5) at loadChildren (app-routing.module.ts:16) at RouterConfigLoader.loadModuleFactory (router.js:3676) at RouterConfigLoader.load (router.js:3650) at MergeMapSubscriber.project (router.js:2798) at MergeMapSubscriber._tryNext (mergeMap.js:44) at MergeMapSubscriber._next (mergeMap.js:34) at resolvePromise (zone.js:1255) at resolvePromise (zone.js:1209) at zone.js:1321 at ZoneDelegate.push.90551.ZoneDelegate.invokeTask (zone.js:434) at Object.onInvokeTask (core.js:28619) at ZoneDelegate.push.90551.ZoneDelegate.invokeTask (zone.js:433) at Zone.push.90551.Zone.runTask (zone.js:205) at drainMicroTaskQueue (zone.js:620) at ZoneTask.push.90551.ZoneTask.invokeTask [as invoke] (zone.js:520) at invokeTask (zone.js:1656) ``` And ``` Uncaught Error: Automatic publicPath is not supported in this browser at publicPath:14 at runtime.js:241 at runtime.js:349 ``` ## πŸ”¬ Minimal Reproduction Here's my `package.json` running `npm run build` should produce the above error. I can also add you to a private repo for more information. ``` { "name": "mustakbil", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "ng-high-memory": "node --max_old_space_size=30000 ./node_modules/@angular/cli/bin/ng", "start": "echo hello && node --max_old_space_size=30000 ./node_modules/@angular/cli/bin/ng serve", "serve": "node --max_old_space_size=30000 ./node_modules/@angular/cli/bin/ng serve --project=Mustakbil", "serve:prod": "node --max_old_space_size=30000 ./node_modules/@angular/cli/bin/ng serve --configuration=production --project=Mustakbil", "build": "node --max_old_space_size=30000 ./node_modules/@angular/cli/bin/ng build --configuration=production --project=Mustakbil", "build:ssr_ignore_dash_dash_watch_from_AngularCliBuilderDotCS": "node --max_old_space_size=30000 ./node_modules/@angular/cli/bin/ng run Mustakbil:server:production ", "build:ssr": "npm run build:ssr_ignore_dash_dash_watch_from_AngularCliBuilderDotCS", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "analyze": "node --max_old_space_size=30000 ./node_modules/@angular/cli/bin/ng build --prod --statsJson=true && webpack-bundle-analyzer dist/stats.json" }, "private": true, "dependencies": { "@angular/animations": "12.0.0-next.9", "@angular/cdk": "12.0.0-next.6", "@angular/common": "12.0.0-next.9", "@angular/compiler": "12.0.0-next.9", "@angular/core": "12.0.0-next.9", "@angular/fire": "6.1.4", "@angular/forms": "12.0.0-next.9", "@angular/google-maps": "12.0.0-next.6", "@angular/material": "12.0.0-next.6", "@angular/platform-browser": "12.0.0-next.9", "@angular/platform-browser-dynamic": "12.0.0-next.9", "@angular/platform-server": "12.0.0-next.9", "@angular/pwa": "0.1200.0-next.8", "@angular/router": "12.0.0-next.9", "@angular/service-worker": "12.0.0-next.9", "@fingerprintjs/fingerprintjs": "^3.0.3", "@nguniversal/aspnetcore-engine": "11.2.1", "@nguniversal/builders": "^11.2.1", "@nguniversal/common": "11.2.1", "@ngx-lite/json-ld": "0.6.3", "@ngx-pwa/local-storage": "11.1.0", "@swimlane/ngx-charts": "17.0.1", "@trademe/ng-defer-load": "8.2.1", "@types/fingerprintjs2": "^2.0.0", "aspnet-prerendering": "3.0.1", "core-js": "3.6.5", "d3-shape": "1.3.7", "dayjs": "^1.8.29", "es6-promise": "^4.2.8", "es6-shim": "^0.35.6", "file-saver": "2.0.5", "firebase": "8.3.2", "install": "^0.13.0", "moment": "2.27.0", "ng2-adsense": "9.1.0", "ng2-ckeditor": "1.3.3", "ngx-build-plus": "11.0.0", "ngx-img-cropper": "10.0.0", "ngx-infinite-scroll": "10.0.1", "preboot": "^7.0.0", "rxjs": "~6.6.0", "screenfull": "5.0.2", "smoothscroll-polyfill": "0.4.4", "tslib": "^2.0.0", "web-animations-js": "^2.3.2", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-builders/custom-webpack": "11.1.1", "@angular-devkit/build-angular": "12.0.0-next.9", "@angular/cli": "12.0.0-next.9", "@angular/compiler-cli": "12.0.0-next.9", "@angular/language-service": "12.0.0-next.9", "@types/jasmine": "~3.5.11", "@types/jasminewd2": "~2.0.3", "@types/node": "^14.0.24", "@types/webappsec-credential-management": "0.6.0", "codelyzer": "^6.0.1", "concat": "3.0.0", "guess-parser": "0.4.22", "guess-webpack": "0.4.22", "html-minifier": "^4.0.0", "html-minifier-terser": "^5.1.1", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~6.3.2", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.3", "karma-jasmine": "~3.3.0", "karma-jasmine-html-reporter": "^1.4.2", "npm": "^6.14.11", "npm-run-all": "^4.1.5", "protractor": "~7.0.0", "purgecss": "^4.0.3", "replace-in-files-cli": "^1.0.0", "ts-node": "~8.10.2", "tslint": "~6.1.0", "typescript": "4.2.3", "webpack-bundle-analyzer": "^4.4.0" } } ``` Below is my `index.html` ```



## πŸ”₯ Exception or Error
<pre><code>
(node:13504) [DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK] DeprecationWarning: MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:13504) [DEP_WEBPACK_CHUNK_TEMPLATE_HASH_FOR_CHUNK] DeprecationWarning: ChunkTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)
(node:13504) [DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS] DeprecationWarning: optimizeChunkAssets is deprecated (use Compilation.hooks.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option)

</code></pre>

## 🌍 Your Environment
<pre><code>

Angular CLI: 12.0.0-next.9
Node: 14.16.0
OS: win32 x64

Angular: 12.0.0-next.9
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                          Version
----------------------------------------------------------
@angular-devkit/architect        0.1102.9
@angular-devkit/build-angular    12.0.0-next.9
@angular-devkit/core             12.0.0-next.8
@angular-devkit/schematics       12.0.0-next.8
@angular/cdk                     12.0.0-next.6
@angular/fire                    6.1.4
@angular/google-maps             12.0.0-next.6
@angular/material                12.0.0-next.6
@angular/pwa                     0.1200.0-next.8
@nguniversal/aspnetcore-engine   11.2.1
@nguniversal/builders            11.2.1
@nguniversal/common              11.2.1
@schematics/angular              12.0.0-next.8
rxjs                             6.6.7
typescript                       4.2.3

</code></pre>
clydin commented 3 years ago

The MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead aspect of the issue is a Webpack 5 related warning and not an error. There may still be several of these present. The code is currently being reviewed to locate and correct any remaining Webpack 4 specific code patterns.

The second aspect regarding the server build appears to be Webpack 5 related but will require addition investigation.

naveedahmed1 commented 3 years ago

@alan-agius4 you can reproduce the issue in Mustakbil-SSR-Demo repo after updating Angular packages ng update @angular/cli @angular/core --createCommits=true --force=true --next

naveedahmed1 commented 3 years ago

@clydin should I add you to the private repo?

alan-agius4 commented 3 years ago

The Uncaught Error: Automatic publicPath is not supported in this browser is caused by an older version of mini-css-extract-plugin, see https://github.com/webpack-contrib/mini-css-extract-plugin/issues/707. This version however, is not used in the Angular CLI version 12.

I tried to reproduce this in your project but I wasn't able, with either of the below commands

yarn build:ssr
ng build
ng serve

Likely this is caused by incorrect module resolution, can you try the below and see if the problem persists.

rm -rf node_modules
npm i
naveedahmed1 commented 3 years ago

Thats strange, I removed node_modules and installed packages again yet no success.

alan-agius4 commented 3 years ago

Which npm version are you using? Can you run npm ls mini-css-extract-plugin and provide the output?

naveedahmed1 commented 3 years ago

npm version :6.14.11

Output of npm ls mini-css-extract-plugin is: -- (empty)

naveedahmed1 commented 3 years ago

Have you tried running the project in Visual Studio? If so, when you run the project you will see the homepage is rendered, but if you open the Chrome Dev Console you will notice the errors and realize that app is broken.

Also update the Angular CLI ng update @angular/cli @angular/core --createCommits=true --force=true --next

naveedahmed1 commented 3 years ago

I removed the node_modules again and installed packages again, Webpack warning is still there but publicPath error is no longer there but I now see below errors:

I dont know why is it looking for modules in https://pagead2.googlesyndication.com

ERROR Error: Uncaught (in promise): ChunkLoadError: Loading chunk default-node_modules_angular_cdk___ivy_ngcc___fesm2015_portal_js-node_modules_angular_cdk___i-50892a failed.
(error: https://pagead2.googlesyndication.com/pagead/js/default-node_modules_angular_cdk___ivy_ngcc___fesm2015_portal_js-node_modules_angular_cdk___i-50892a.js)
ChunkLoadError: Loading chunk default-node_modules_angular_cdk___ivy_ngcc___fesm2015_portal_js-node_modules_angular_cdk___i-50892a failed.
(error: https://pagead2.googlesyndication.com/pagead/js/default-node_modules_angular_cdk___ivy_ngcc___fesm2015_portal_js-node_modules_angular_cdk___i-50892a.js)
    at Object.__webpack_require__.f.j (jsonp chunk loading:27)
    at ensure chunk:6
    at Array.reduce (<anonymous>)
    at Function.__webpack_require__.e (ensure chunk:5)
    at loadChildren (app-routing.module.ts:16)
    at RouterConfigLoader.loadModuleFactory (router.js:3676)
    at RouterConfigLoader.load (router.js:3650)
    at MergeMapSubscriber.project (router.js:2798)
    at MergeMapSubscriber._tryNext (mergeMap.js:44)
    at MergeMapSubscriber._next (mergeMap.js:34)
    at resolvePromise (zone.js:1255)
    at resolvePromise (zone.js:1209)
    at zone.js:1321
    at ZoneDelegate.push.90551.ZoneDelegate.invokeTask (zone.js:434)
    at Object.onInvokeTask (core.js:28619)
    at ZoneDelegate.push.90551.ZoneDelegate.invokeTask (zone.js:433)
    at Zone.push.90551.Zone.runTask (zone.js:205)
    at drainMicroTaskQueue (zone.js:620)
    at ZoneTask.push.90551.ZoneTask.invokeTask [as invoke] (zone.js:520)
    at invokeTask (zone.js:1656)

And some times this error:

jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/default-src_app_shared_services_lookup_service_ts.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/default-node_modules_angular_material___ivy_ngcc___fesm2015_select_js.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/default-src_app_shared_validators_custom-validators_ts.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/default-node_modules_angular_material___ivy_ngcc___fesm2015_input_js.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/default-node_modules_angular_cdk___ivy_ngcc___fesm2015_overlay_js.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/default-node_modules_angular_cdk___ivy_ngcc___fesm2015_portal_js-node_modules_angular_cdk___i-50892a.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/default-node_modules_angular_material___ivy_ngcc___fesm2015_dialog_js.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/default-src_app_shared_cascading-select_cascading-select_module_ts-src_app_shared_dynamic-for-df0bfe.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/src_app_account_enable-notifications_component_ts.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/src_app_account_account_module_ts.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/default-src_app_account_login-dialog-launch_component_ts-src_app_shared_utilities_ts.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/common.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
jsonp chunk loading:60 GET https://pagead2.googlesyndication.com/pagead/js/src_app_shared_rate-app_rate-app_component_ts.js net::ERR_ABORTED 404
__webpack_require__.F.j @ jsonp chunk loading:60
(anonymous) @ chunk prefetch function:4
__webpack_require__.E @ chunk prefetch function:3
(anonymous) @ startup prefetch:1
__webpack_require__.O @ chunk loaded:25
webpackJsonpCallback @ jsonp chunk loading:94
(anonymous) @ main.js:1
load script:41 GET https://pagead2.googlesyndication.com/pagead/js/default-node_modules_angular_material___ivy_ngcc___fesm2015_input_js.js net::ERR_ABORTED 404
__webpack_require__.l @ load script:41
__webpack_require__.f.j @ jsonp chunk loading:43
(anonymous) @ ensure chunk:6
__webpack_require__.e @ ensure chunk:5
loadChildren @ app-routing.module.ts:16
loadModuleFactory @ router.js:3676
load @ router.js:3650
(anonymous) @ router.js:2798
_tryNext @ mergeMap.js:44
_next @ mergeMap.js:34
next @ Subscriber.js:49
(anonymous) @ subscribeToArray.js:3
_trySubscribe @ Observable.js:42
subscribe @ Observable.js:28
call @ mergeMap.js:19
subscribe @ Observable.js:23
call @ mergeMap.js:19
subscribe @ Observable.js:23
call @ catchError.js:14
subscribe @ Observable.js:23
innerSubscribe @ innerSubscribe.js:67
_innerSub @ mergeMap.js:57
_tryNext @ mergeMap.js:51
_next @ mergeMap.js:34
next @ Subscriber.js:49
(anonymous) @ subscribeToArray.js:3
_trySubscribe @ Observable.js:42
subscribe @ Observable.js:28
call @ mergeMap.js:19
subscribe @ Observable.js:23
call @ filter.js:13
subscribe @ Observable.js:23
call @ take.js:22
subscribe @ Observable.js:23
call @ throwIfEmpty.js:13
subscribe @ Observable.js:23
call @ catchError.js:14
subscribe @ Observable.js:23
call @ map.js:16
subscribe @ Observable.js:23
innerSubscribe @ innerSubscribe.js:67
_innerSub @ mergeMap.js:57
_tryNext @ mergeMap.js:51
_next @ mergeMap.js:34
next @ Subscriber.js:49
(anonymous) @ subscribeToArray.js:3
_trySubscribe @ Observable.js:42
subscribe @ Observable.js:28
call @ mergeMap.js:19
subscribe @ Observable.js:23
call @ scan.js:18
subscribe @ Observable.js:23
call @ takeLast.js:22
subscribe @ Observable.js:23
call @ throwIfEmpty.js:13
subscribe @ Observable.js:23
call @ map.js:16
subscribe @ Observable.js:23
call @ map.js:16
subscribe @ Observable.js:23
call @ catchError.js:14
subscribe @ Observable.js:23
call @ map.js:16
subscribe @ Observable.js:23
innerSubscribe @ innerSubscribe.js:67
_innerSub @ switchMap.js:44
_next @ switchMap.js:34
next @ Subscriber.js:49
notifyNext @ switchMap.js:66
_next @ innerSubscribe.js:10
next @ Subscriber.js:49
(anonymous) @ subscribeToPromise.js:5
push.90551.ZoneDelegate.invoke @ zone.js:400
onInvoke @ core.js:28632
push.90551.ZoneDelegate.invoke @ zone.js:399
push.90551.Zone.run @ zone.js:160
(anonymous) @ zone.js:1318
push.90551.ZoneDelegate.invokeTask @ zone.js:434
onInvokeTask @ core.js:28619
push.90551.ZoneDelegate.invokeTask @ zone.js:433
push.90551.Zone.runTask @ zone.js:205
drainMicroTaskQueue @ zone.js:620
push.90551.ZoneTask.invokeTask @ zone.js:520
invokeTask @ zone.js:1656
globalZoneAwareCallback @ zone.js:1682
Show 55 more frames
core.js:6456 ERROR Error: Uncaught (in promise): ChunkLoadError: Loading chunk default-node_modules_angular_material___ivy_ngcc___fesm2015_input_js failed.

Edit publicPath error is still there, if I comment out addAdsenseScriptTag() it throws below publicPath error, otherwise it show above errors.

 Uncaught Error: Automatic publicPath is not supported in this browser
    at publicPath:14
    at runtime.js:241
    at runtime.js:349
clydin commented 3 years ago

As an experiment, can you try adding a deployUrl setting with the value of an empty string ("")?

naveedahmed1 commented 3 years ago

Surprisingly adding deployUrl fixed the issue, I added it for both browser and server.

One more thing which I noticed is that the javascript bundles are no longer in sequential order.

js-bundles

clydin commented 3 years ago

Webpack 5 uses a new deterministic identifier algorithm. The concept being that it will limit cache misses by increasing the probability of preserving the file names.

naveedahmed1 commented 3 years ago

I see, btw this upgrade reduced size of my js bundles as well:

Browser Bundles: 3.33Mb > 3.28Mb

Server Bundles : 4.67Mb > 3.89Mb

naveedahmed1 commented 3 years ago

Few more things to bring in your notice, after update:

  1. Compilation takes little longer than previous version
  2. Page is not automatically refreshed, after we make any changes to the app and app is recompiled.
alan-agius4 commented 3 years ago

@naveedahmed1, can you please try out the latest RC version?

vdumbrav commented 3 years ago

I had a similar problem, I deleted angular-builders/custom-webpack, after I changed angular builder from custom-webpack to default and added in tsconfig.json -> "skipLibCheck": true but the bundle increased

NG11 latest

Initial ES5 Total              |   1.00 MB
Initial ES2015 Total           | 855.20 kB

NG12 RC

Initial ES5 Total              |   1.02 MB
Initial ES2015 Total           | 875.06 kB
naveedahmed1 commented 3 years ago

@alan-agius4 I can confirm although DeprecationWarning is still there but the issue has been resolved and app is working fine.

alan-agius4 commented 3 years ago

Closing as this issue should be solved.

If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use ng new repro-app to create a new project where you reproduce the problem.

angular-automatic-lock-bot[bot] commented 3 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.