-
Notifications
You must be signed in to change notification settings - Fork 581
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: build fixes related to environment files handling
- Loading branch information
Showing
10 changed files
with
68 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -449,7 +449,7 @@ | |
} | ||
}, | ||
"engines": { | ||
"node": ">=16.20.1", | ||
"node": ">=20.11.1", | ||
"yarn": ">=1.22.19" | ||
}, | ||
"prettier": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as path from 'path'; | ||
import * as fs from 'fs'; | ||
|
||
function replaceFilesForProduction() { | ||
const env = process.env['NODE_ENV'] || 'development'; | ||
|
||
console.log(`Current NODE_ENV: ${process.env['NODE_ENV']}`); | ||
|
||
if (env === 'production') { | ||
const sourceFile = path.join(path.resolve('./src/environments'), 'environment.prod.ts'); | ||
const targetFile = path.join(path.resolve('./src/environments'), 'environment.ts'); | ||
|
||
fs.copyFileSync(sourceFile, targetFile); | ||
console.log(`Replaced environment file with ${sourceFile}`); | ||
} else { | ||
console.log('Development build, no file replacement necessary.'); | ||
} | ||
} | ||
|
||
replaceFilesForProduction(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters