Florian Ludewig
Florian Ludewig

Reputation: 6002

Angular 7 relocate Assets File after Build

I have this sitemap.xml file in my assets folder under src: assets folder

When building my project via the cli with ng build --prod the resulting folder looks like this: assets folder

My question is simply how I can move the sitemap.xml file outside the assets folder when building my project?

Upvotes: 5

Views: 2900

Answers (1)

peinearydevelopment
peinearydevelopment

Reputation: 11464

Based on the documentation here, you just need to update your angular.json file.

Something like the following should work for your sitemap file:

"assets": [{ "glob": "sitemap.xml", "input": "src/assets/", "output": "/" }],

Upvotes: 6

Related Questions