Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): set Tailwind CSS mode when using …
Browse files Browse the repository at this point in the history
…Tailwind

Tailwind now suppports an environment variable named `TAILWIND_MODE` with possible values of `build` and `watch`. If the variable has not been set, the tooling will now set the variable based on the builder's `watch` option.
  • Loading branch information
clydin authored and josephperrott committed Apr 21, 2021
1 parent 82ca7d0 commit 2ac73c7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
);
}
if (tailwindPackagePath) {
if (process.env['TAILWIND_MODE'] === undefined) {
process.env['TAILWIND_MODE'] = buildOptions.watch ? 'watch' : 'build';
}
extraPostcssPlugins.push(require(tailwindPackagePath)({ config: tailwindConfigPath }));
}
}
Expand Down

0 comments on commit 2ac73c7

Please sign in to comment.