From f631c92a3a4c4133f8867aee2c79e5bc3293cfc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Fri, 19 Apr 2024 10:14:26 +0200 Subject: [PATCH] fix(angular): fix loading postcss configuration in ng-packagr executors --- .../executors/utilities/ng-packagr/stylesheet-processor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular/src/executors/utilities/ng-packagr/stylesheet-processor.ts b/packages/angular/src/executors/utilities/ng-packagr/stylesheet-processor.ts index eb691db4a1705..5f14ac6fda6a8 100644 --- a/packages/angular/src/executors/utilities/ng-packagr/stylesheet-processor.ts +++ b/packages/angular/src/executors/utilities/ng-packagr/stylesheet-processor.ts @@ -15,7 +15,7 @@ import { colors } from 'ng-packagr/lib/utils/color'; import { getTailwindConfigPath } from './tailwindcss'; import { workspaceRoot } from '@nx/devkit'; import type { PostcssConfiguration } from 'ng-packagr/lib/styles/postcss-configuration'; -import { gte } from 'semver'; +import { gt } from 'semver'; import { getInstalledPackageVersionInfo } from '../angular-version-utils'; const maxWorkersVariable = process.env['NG_BUILD_MAX_WORKERS']; @@ -94,7 +94,7 @@ export class StylesheetProcessor { const { version: ngPackagrVersion } = getInstalledPackageVersionInfo('ng-packagr'); let postcssConfiguration: PostcssConfiguration | undefined; - if (gte(ngPackagrVersion, '17.3.0')) { + if (gt(ngPackagrVersion, '17.2.0')) { const { loadPostcssConfiguration, } = require('ng-packagr/lib/styles/postcss-configuration');