You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -43,10 +47,15 @@ In a typical `tailwind.config.js` file, the `purge` property of the tailwind con
43
47
Nx has a utility function for determining the glob representation of all files the application depends on (based on the Nx Dependency Graph), which should be used when setting this purge property. This eliminates additional manual maintenance as your workspace progresses.
// place your own app's glob pattern (for example)
56
+
join(__dirname, '**/*.{js,ts,jsx,tsx}'),
57
+
...createGlobPatternsForDependencies(__dirname),
58
+
],
50
59
darkMode:false, // or 'media' or 'class'
51
60
theme: {
52
61
extend: {},
@@ -58,6 +67,8 @@ module.exports = {
58
67
};
59
68
```
60
69
70
+
`createGlobPatternsForDependencies(..)` uses the Nx dependency graph to generate glob patterns for all the app's **dependencies** (e.g. for all referenced libraries within the Nx workspace).
71
+
61
72
_NOTE:_ To ensure proper purging for custom configurations, be sure that the `NODE_ENV` environment variable is set to `production`. By default, Nx only purges on prod build (for example: `nx build --prod`).
0 commit comments