ng build fails to copy .htaccess to dist folder
See original GitHub issueng build
does not copy .htaccess
to dest
dir. I have tried to put .htaccess
in both src
and src/assets
folder but in both cases .htaccess
does not appears in dist
folder.
Here are more details about:
OS?
Linux Mint 18.1 “Serena”
Versions.
angular-cli: 1.0.0-beta.28.3 node: 7.5.0 os: linux x64 @angular/common: 2.4.7 @angular/compiler: 2.4.7 @angular/core: 2.4.7 @angular/forms: 2.4.7 @angular/http: 2.4.7 @angular/platform-browser: 2.4.7 @angular/platform-browser-dynamic: 2.4.7 @angular/router: 3.4.7 @angular/compiler-cli: 2.4.7
Repro steps.
ng new angular-cli-test cp kibernum-dnc-client/src/.htaccess angular-cli-test/src/ cd angular-cli-test
ng build ls -la dist/
mv src/.htaccess src/assets/ ng build ls -la dist/
The log given by the failure.
There is no log error. Errror is that I expect that file .htaccess
is copied in dist
folder.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
When you put it in
src/assets/.htaccess
, it will be copied intodist/assets/.htaccess
.If you want it to be in
dist/.htaccess
, then you should be insrc/.htaccess
AND you need to add it toangular-cli.json
in theassets
array (likefavicon.ico
).Change this bit:
to