0

I have this folder structure which is created using nx dynamic module federation (minimum fileset for better visualization)

 .
   └─ apps
      ├─ app-1
      │  └─ src
      │     └─ assets
      │        └─ test.json
      ├─ app-2
      │  └─ src
      │     └─ assets
      │        └─ test-2.json
      └─ shell
         └─ src
            └─ assets

I am using this glob in the project.json (angular.json equivalent in nx) of the shell app:

"assets": ["apps/shell/src/favicon.ico", "apps/shell/src/assets", {
          "glob": "*",
          "input": "apps/*/*/assets",
          "output": "assets"
        }],

Which doesn't seems to be working.

But it works when I use the glob pattern with the actual full path, i.e. without wildcards.

"assets": ["apps/shell/src/favicon.ico", "apps/shell/src/assets", {
          "glob": "*",
          "input": "apps/app-1/src/assets",
          "output": "assets"
        }],

I want to use wild cards as there can be multiple apps in the future. Am I missing something?

I expected the wild cards to work as per my testing here.

https://www.digitalocean.com/community/tools/glob?comments=true&glob=apps%2F%2A%2A%2F%2A%2Fassets&matches=false&tests=apps%2Fapp-1%2Fsrc%2Fassets&tests=apps%2Fapp-2%2Fsrc%2Fassets

Bhanu Chhabra
  • 474
  • 1
  • 6
  • 22

0 Answers0