fileReplacements doesn't work with css files
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Area
- [x] devkit
- [ ] schematics
Versions
node --version: v9.4.0 npm --version: 5.6.0 macOS high sierra 10.13.5
Repro steps
1- In angular.json add a new configuration and try to replace a css file. 2- add a simple background style to header.local.css 3- import the header.css file into styles.scss
E.g.
"configurations": {
"local": {
"optimization": false,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": false,
"vendorChunk": false,
"buildOptimizer": false,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/enviroment.local.ts"
},
{
"replace": "src/css/header.css",
"with": "src/css/header.local.css"
}
]
},
The log given by the failure
none
Desired functionality
get the header.css replaced by header.local.css
Mention any other details that might be useful
Tested with angular cli version 6.0.1 and angular cli version 6.1.0-beta.0
@mcescalante It's been awhile since your post but for index files try using this instead of "fileReplacements":
"index": {
"input": "src/index.prod.html",
"output": "index.html"
},
This also will be useful and easier for robots.txt replacement for production.
@filipesilva @alan-agius4 any update on this?
Hi asphub, for the Internationalization you can use the i18n built in mechanism provided by Angular !
@kodze I am already using i18n for Internationalization, but the issue is with the SCSS file replacement for the UI to switch Arabic layout.
I am using SCSS variables to manage this
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.