Is it possible to rename libs to packages in nx?
Asked Answered
R

3

14

I want to rename libs folder that nx creates to packages.

Is it something possible with nx?

Radish answered 6/4, 2020 at 6:34 Comment(0)
B
34

You can rename a lib e.g. nx g @nrwl/workspace:mv --project my-lib --destination their-lib, more details you can find on this issue here.

Brune answered 15/7, 2021 at 1:58 Comment(0)
S
3

To achieve this, you will need to change the workspace.json project's paths that of all the projects that you have into the libs folder.

Also, you will need to update the tsconfig.json to update the project's resultant path too. Here you will update typescript's references.

Stallfeed answered 18/5, 2020 at 21:44 Comment(0)
J
0

You can do this by adding the following in your nx.json:

 "workspaceLayout": {
    "libs": "packages"
  },

here's how it should look.

Juristic answered 2/12, 2023 at 14:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.