Open nioe opened 1 year ago
Angular can’t be configured to do what everyone else does, and build in-place?
As far as I understood, I could move the dist
folder in my src
folder. But since it generates a new package.json
this wouldn't do the trick IMHO.
Any ideas or thoughts?
So I managed to make it work but that's not a simple way. Main points are:
Hi @statyan Sorry for the late response and thank you for the detailed answer. I'll give that a try. But I still think that npm should support setting the directory which is linked, in a more easy way.
Simplyfied I've got the following project structure:
In the root
package.json
I've got the following workspaces config:When I run
npm install
all dependecies are installed and local packages are linked as expected. The problem is, that Angular builds libraries by default within adist
folder outside of the actual workspace and creates a newpackage.json
in it. So this directory is meant to be packed and published.In the
demo-app
however, the source folders of the Angular libraries are linked, since this is configured in theworkspaces
of course. I haven't found any hint on how I can tell npm to link another directory then the actual workspace.I used to use Lerna before and it respected the
publishConfig.directory
setting within the package'spackage.json
for linking.So my request would be that npm either respects this property as well or finds another way to configure a different directory to link duing the install phase.