New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Asset replacement in ng serve #18787
Comments
Hi @soyjuanmedina, can you please provide the reproduction steps? Thanks. |
Hi, thanks. I'm trying to do it, but I can't achivement. I create a new proyect:
Then, in the angular.json I add "production": {..., And create this new favicon in src/app/customizations/assets/fav/ Then I run
and I expect in dist/testApp/assets/fav have this new favicon (in my project some similar works) but I still have the old one. My problem in the main app when I run |
Created repo replicating the issue: It looks like From
copy-webpack-plugin is ignoring the asset if it already exists and just keeps what's first in the list.
just before calling
|
Temporary solution for me was creating assets sandwich with overriding assets both above and below with the same order:
Grim but works |
…in compilation With this change we align the copying of assets between `ng build` and `ng serve`. Previously in `ng serve` already copied assets where not overridden. More info: https://webpack.js.org/plugins/copy-webpack-plugin/#force Closes #18787
…in compilation With this change we align the copying of assets between `ng build` and `ng serve`. Previously in `ng serve` already copied assets where not overridden. More info: https://webpack.js.org/plugins/copy-webpack-plugin/#force Closes #18787 (cherry picked from commit 4d2f4ec)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)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
#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
The text was updated successfully, but these errors were encountered: