No Asset replacement in ng serve
See original GitHub issueπ Bug report
Command (mark with an x
)
- new
- build
- [ x ] serve
- test
- e2e
- generate
- add
- update
- lint
- xi18n
- run
- config
- help
- version
- doc
Is this a regression?
In the previous version works with the filereplacment optionDescription
I update to Angular 10 and have an Issue with the filereplacement in the assets.
I find this bug report
https://github.com/angular/angular-cli/issues/16779
That says itβs not a bug and give an alternative, to configure different assets for each environment.
Itβs works for me, but only when I run ng build, but when run ng serve, the assets not be replace
π Your Environment
Angular CLI: 10.0.2
Node: 12.18.0
OS: win32 x64
Angular: 10.0.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker
Ivy Workspace: No
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.1000.2
@angular-devkit/build-angular 0.1000.2
@angular-devkit/build-optimizer 0.1000.2
@angular-devkit/build-webpack 0.1000.2
@angular-devkit/core 10.0.2
@angular-devkit/schematics 10.0.2
@angular/cdk 10.0.2
@angular/cli 10.0.2
@angular/fire 5.4.2
@angular/material 10.0.2
@ngtools/webpack 10.0.2
@schematics/angular 10.0.2
@schematics/update 0.1000.2
rxjs 6.6.0
typescript 3.9.6
webpack 4.43.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
File added to assets folder after ng serve are not served by ...
It seems Angular's assets folder is meant to serve only static files which can be copied on the build. What are all the...
Read more >Angular workspace configuration
The architect/server section configures defaults for creating a Universal app with server-side rendering, using the ng run <project>:server command. TheΒ ...
Read more >ng serve - Angular
Option Description Value Type Default Value
ββhmr Enable hot module replacement. boolean false
ββhost Host to listen on. string localhost
ββopen Opens the url in default...
Read more >File replacements when building angular projects
This short article is about replacing files (e.g. configuration files) for different build configurations/targets (like dev , qa and prod )Β ...
Read more >What's new in Angular CLI 11.0? | Ninja Squad
Hot Module Replacement ... The biggest news for ng serve is the out-of-the-box support for HMR! The CLI has been supported ng serve...
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
Temporary solution for me was creating assets sandwich with overriding assets both above and below with the same order:
Grim but works
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.