Ignore folder in project construction for production

Asked

Viewed 36 times

0

Hello,

I’d like when to execute the ng build --prod angular ignores a folder and its contents inside the folder assets.

I tried using the following configuration inside the.json angular, it even works, but it is also applied when running ng serve resulting in file not found error.

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

But I want this to apply to production only.

Anybody got any ideas? Thanks in advance!

  • I’m not sure, but I think in the file tsconfig.spec.json has a property called exclude where vc passes an array with the paths of the files you want to remove from the build.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.