Angular 14 Upgrade, removing deployUrl as a build option causing fail in loading chunk files from subfolder
See original GitHub issueWhich @angular/* package(s) are the source of the bug?
compiler-cli
Is this a regression?
No
Description
We have a scenario where we deploy the UI code under the subfolder wwwroot/approot in IIS server, we are using deployUrl as 'approot ’ to load the lazy loaded chunk files. When we upgrade the Angular 14, deployUrl is deprecated and if we use baseHref, it’s failing to load the chunk files. It’s trying to load the chunk files from the main root i.e webroot but the files are under wwwroot/approot. I couldn’t find any solution to acheive this without deployUrl.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 14.0.6
Node: 16.12.0
Package Manager: npm 8.1.0
OS: win32 x64
Anything else?
No response
Issue Analytics
- State:
- Created a year ago
- Comments:9
Top Results From Across the Web
What is best way to go about replacing 'deployUrl' in angular ...
Ended up finding something to replace this with: Replaced "deployUrl" with "baseHref" in angular.json; Added the APP_BASE_HREF override in ...
Read more >single-spa-angular
To build your Angular CLI application as a single-spa app do the following. Open angular.json; Locate the project you wish to update. Navigate...
Read more >How to Solve the Chunk Load Error in JavaScript - Rollbar
Whenever there's an error observed in dynamically fetching helper JavaScript files known as Chunks, a ChunkLoad Error is thrown.
Read more >angular build watch Code Example - Code Grepper
Answers related to “angular build watch”. angular build production · ng build prod · build angular project · angular deployment · how to...
Read more >Public Release Notes - Intershop Progressive Web App
Angular 14 and dependecies update (see Migrations / 2.4 to 3.0 for more ... repair chunk output file names for differential loading (#896)...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As you have suggested, using @angular-builders/custom-webpack:browser and setting the publicPath in custom webconfig file resolved the issue. Thanks for your suggestions @alan-agius4 .
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.