When I build project by ng build
command in dist
folder I got my js
files both with all other resources, but I want to move all images and fonts in separate folder like assets
. Can anybody help me?
Update:
angular.json
"assets": [
"src/favicon.ico",
"src/assets"
],
in scss of component I have:
background-image: url('assets/img/no-notifications.svg');
but in result I got in dist folder next file:
no-notifications.7e08682a570485d1c108.svg
Goal is keep image path same as he has been specified in scss file:
assets/img/no-notifications.svg
If you didn't already know, a new option was added into angular cli configuration (since v7.2.1) to copy css resources into another folder (relative to the output path).
"outputPath": "wwwroot",
"resourcesOutputPath": "images"
https://angular.io/cli/build
try this
create img
folder inside assets
and use path like ./assets/img/your_image
it will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With