Back to Nx

Remove Tailwind Config From Ng Packagr Executors

packages/angular/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.md

22.7.11.4 KB
Original Source

Remove tailwindConfig from ng-packagr Executors

Remove the deprecated 'tailwindConfig' option from ng-packagr executors. Tailwind CSS configurations located at the project or workspace root will be picked up automatically.

Sample Code Changes

Remove tailwindConfig from the @nx/angular:ng-packagr-lite or @nx/angular:package executor options in project configuration.

Before
json
{
  "targets": {
    "build": {
      "executor": "@nx/angular:ng-packagr-lite",
      "options": {
        "project": "libs/lib1/ng-package.json",
        "tailwindConfig": "libs/lib1/tailwind.config.js"
      }
    }
  }
}
After
json
{
  "targets": {
    "build": {
      "executor": "@nx/angular:ng-packagr-lite",
      "options": {
        "project": "libs/lib1/ng-package.json"
      }
    }
  }
}

Remove tailwindConfig from the @nx/angular:ng-packagr-lite or @nx/angular:package executor target defaults in nx.json.

Before
json
{
  "targetDefaults": {
    "@nx/angular:ng-packagr-lite": {
      "options": {
        "project": "{projectRoot}/ng-package.json",
        "tailwindConfig": "{projectRoot}/tailwind.config.js"
      }
    }
  }
}
After
json
{
  "targetDefaults": {
    "@nx/angular:ng-packagr-lite": {
      "options": {
        "project": "{projectRoot}/ng-package.json"
      }
    }
  }
}