angular copy folder to dist 1

angular copy folder to dist

// Copy files from a location relative to the project's root to relative of the build output folder
// In the example below I am copying all files from myfolder to the root dist folder.
// For angular < 9 : angular-cli.json, for > 9: angular.json

"assets": [
   { "glob": "**/*", "input": "./assets/", "output": "./assets/" },
   { "glob": "favicon.ico", "input": "./", "output": "./" },
   { "glob": "**/*", "input": "../myfolder", "output": "./" }
],

Here is what the above code is Doing:
1. Copy all files from the assets folder to the dist/assets folder.
2. Copy the favicon.ico file from the root folder to the dist folder.
3. Copy all files from the myfolder folder to the dist folder.

Similar Posts