You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have many applications in angular that all use a common library I have created. All my libraries, including my common library use the same environment.
I use the following file structure :
|─ app1
|─ app2
|─ common
|─ environments
I have my angular apps (app1, app2), a separate folder for the common library my apps need, and a separate folder for the environments.
To include the common and environments folder in my apps, I would use npm link. This way I could make changes in my environment in one place, and all changes would be immediately available on all my projects. Unfortunately, this no longer works...
Until angular-cli.beta.22 this structure used to work. The only problem used to be that the command ng build -prod didn't take into consideration the environment.prod.ts, so I had to use a workaround for that, which wasn't very difficult.
Since I have updated to angular-cli.beta.25 this no longer works :'(
Now ng serve and ng build no longer work. They don't take into consideration the folders I have linked.
The only possible solution I have in my mind right now, would be to have a separate depository for common and environments. But that would mean that every time I make a change, I have to commit it, push it and pull it for all my projects. Not very fun...
This functionality (being able to use npm link to include external libraries) looks a very basic use case to me. So is this is a bug, or is there something I am missing?
Thanks for your help, and keep on the awesome work :)
The text was updated successfully, but these errors were encountered:
OS?
Versions.
angular-cli: 1.0.0-beta.25.5
node: 6.9.1
os: darwin x64
@angular/common: 2.4.2
@angular/compiler: 2.4.2
@angular/core: 2.4.2
@angular/forms: 2.4.2
@angular/http: 2.4.2
@angular/platform-browser: 2.4.2
@angular/platform-browser-dynamic: 2.4.2
@angular/router: 3.4.2
Mention any other details that might be useful.
I have many applications in angular that all use a common library I have created. All my libraries, including my common library use the same environment.
I use the following file structure :
|─ app1
|─ app2
|─ common
|─ environments
I have my angular apps (app1, app2), a separate folder for the common library my apps need, and a separate folder for the environments.
To include the common and environments folder in my apps, I would use npm link. This way I could make changes in my environment in one place, and all changes would be immediately available on all my projects. Unfortunately, this no longer works...
Until angular-cli.beta.22 this structure used to work. The only problem used to be that the command
ng build -prod
didn't take into consideration theenvironment.prod.ts
, so I had to use a workaround for that, which wasn't very difficult.Since I have updated to angular-cli.beta.25 this no longer works :'(
Now
ng serve
andng build
no longer work. They don't take into consideration the folders I have linked.The only possible solution I have in my mind right now, would be to have a separate depository for common and environments. But that would mean that every time I make a change, I have to commit it, push it and pull it for all my projects. Not very fun...
This functionality (being able to use npm link to include external libraries) looks a very basic use case to me. So is this is a bug, or is there something I am missing?
Thanks for your help, and keep on the awesome work :)
The text was updated successfully, but these errors were encountered: