File replacement for prod release not working
See original GitHub issueπ Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
NA
Description
Need to replace index.html with index.prod.html when build with ng build
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
},
{
"replace": "src/index.html",
"with": "src/index.prod.html"
}
],
"outputHashing": "all"
},
π₯ Exception or Error
Schema validation failed with the following errors:
Data path "/fileReplacements/1" must have required property 'src'.
Data path "/fileReplacements/1/replace" must match pattern "\.(([cm]?j|t)sx?|json)$".
Data path "/fileReplacements/1" must match exactly one schema in oneOf.de>
π Your Environment
Angular CLI: 13.1.4
Node: 16.15.0
Package Manager: npm 8.5.5
OS: win32 x64
Angular: 13.1.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.1301.4
@angular-devkit/build-angular 13.3.5
@angular-devkit/core 13.1.4
@angular-devkit/schematics 13.1.4
@angular/cdk 13.3.6
@angular/cli 13.1.4
@angular/material 13.3.6
@angular/material-moment-adapter 13.3.6
@schematics/angular 13.1.4
rxjs 7.4.0
typescript 4.5.5
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
[9.0.1] ng build file replacements don't work after update to v9
I have a `config.js` file which has some settings in it, and it should be replaced by a production `config.js` when performing a...
Read more >Unable to run release application in elixir after creating ...
@TheBrofessor I tried with removing url option in prod.exs but still nothing happened it does not listen to port 4000. I have tried...
Read more >prod --release build no longer works - Ionic Forum
Hello guys, I have a new problem with --prod --release build command. When I try to build an apk file using this command...
Read more >Phoenix Umbrella Prod Release Doesn't Start - Elixir Forum
seems like it's running, but I can't navigate to the landing page in my browser. Here's how I have everything configured: Elixir is...
Read more >Prepare your app for release - Android Developers
Learn how to build a signed, release-ready APK. This process is the same for all Android apps.
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
You can use specify the output name when using the index output option.
fileReplacements
is intended to only replace files that are in the TypeScript program.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.