Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular-9 build does not include symlink folder in /assets

I got a new Angular 9 project and we share image files accross multiple apps with a Symlink (symbolic link) folder inside the /assets.

Turns out that when we build this folder is not added to the dist/assets

![enter image description here

even the --preserve-symlinks or setting in the angular.json file do not help.

ng build --preserve-symlinks

It used to work with Angular-8 but since the upgrade no longer.

Anyone had this issue?

like image 486
PeterFromCologne Avatar asked Jun 02 '26 07:06

PeterFromCologne


1 Answers

To anyone coming across this thread.

It seems like this issue has been resolved with Angular 10.

At least if you use junctions in Windows, the files inside the linked folder are copied to the assets folder by the CLI as expected. I did not use the --preserve-symlinks flag, as I think it's deprecated or removed, but I set preserveSymlinks to true in the anguler.json file at:

projects.[projName].architect.build.options.preserveSymlinks
like image 186
LoaderB0T Avatar answered Jun 03 '26 22:06

LoaderB0T