Skip to content

Split angular.json into multiple files #22655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
8 of 15 tasks
developer239 opened this issue Feb 6, 2022 · 6 comments
Open
8 of 15 tasks

Split angular.json into multiple files #22655

developer239 opened this issue Feb 6, 2022 · 6 comments
Labels
area: @angular/cli area: @angular-devkit/core feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Milestone

Comments

@developer239
Copy link

developer239 commented Feb 6, 2022

🚀 Feature request

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Description

I have a monorepository and I want to split my angular.json into separate files.

So that I can have something like this:

{
  "version": 2,
  "projects": {
    "module-auth": "packages/auth",
    "module-core": "packages/core",
    "module-button": "packages/button"
  }
}

After working with NX I noticed that with Lerna and the usual setup my angular.json file has 119 lines of code even though I basically have an empty repository. I believe that having a single angular.json file is a very bad idea, especially for bigger monorepositories or UI libraries.

Describe the solution you'd like

Make the JSON configuration 1:1 with what NX does or implement similar functionality.

@alan-agius4 alan-agius4 changed the title Is there going to be Angular Json V2? Split angular.json into multiple files Feb 7, 2022
@alan-agius4
Copy link
Collaborator

Splitting angular.json into multiple projects level configuration is something that we definitly want to explore in the future.

However, it is very unlikely that it will 1:1 with the NX solution.

@ngbot ngbot bot modified the milestone: needsTriage Feb 7, 2022
@alan-agius4 alan-agius4 added the feature Issue that requests a new feature label Feb 7, 2022
@alan-agius4 alan-agius4 changed the title Split angular.json into multiple files Split angular.json into multiple files Feb 8, 2022
@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Feb 8, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 8, 2022

This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

You can find more details about the feature request process in our documentation.

@Den-dp
Copy link

Den-dp commented Feb 17, 2022

I think that such functionality will lead to a win-win situation for both Angular and Nx.

  • ng cli users will get more intuitive and fast code locating
  • nx cli team will get an opportunity to adopt the new native approach of splitting angular.json (and remove some hacks related to v2 schema)

cc: @vsavkin

@developer239
Copy link
Author

@Den-dp I will share this issue with more people maybe it will get at least into the consideration list. I have no idea why would anyone dislike this and I would like to hear counterarguments. 😅

Personally, if I had to work on a monorepo with Angular and without nx I would write a custom script that would build the angular.json file the way I described.

@angular-robot angular-robot bot added feature: under consideration Feature request for which voting has completed and the request is now under consideration and removed feature: votes required Feature request which is currently still in the voting phase labels Feb 18, 2022
@srukshan98
Copy link

srukshan98 commented Aug 9, 2024

It is essential to address this in Angular now, especially with the advent of native federation, which simplifies the process of working on microfrontends within Angular workspaces. Managing a large angular.json file in this context is neither ideal nor efficient and can become quite cumbersome.

@alan-agius4 alan-agius4 marked this as a duplicate of #30278 May 9, 2025
@PowerSupply
Copy link

Anything new regarding this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @angular/cli area: @angular-devkit/core feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

5 participants