bojanbass / nx-aws

NX monorepo with AWS S3 caching
143 stars 29 forks source link

How can we make it work with the new nx configuration of nx 19. #659

Open Indronil opened 2 weeks ago

Indronil commented 2 weeks ago

I want to only run the cache for certain targets. Can we do that? As post nx 17 cachableOperations isn't available anymore instead we have targetProjects with cache property.

Need help to figure it out.

bojanbass commented 3 days ago

You can define what is cached inside nx.json. Example:

  "targetDefaults": {
    "build": {
      "dependsOn": ["^build", "ts-check", "i18n-extract"],
      "inputs": ["production", "^production"],
      "cache": true
    },
    "ts-check": {
      "inputs": ["production", "^production"],
      "cache": false
    },
}