We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8e57af commit c5c3705Copy full SHA for c5c3705
packages/angular-rspack/src/lib/utils/postcss-configuration.ts
@@ -22,6 +22,7 @@ interface RawPostcssConfiguration {
22
const postcssConfigurationFiles: string[] = [
23
'postcss.config.json',
24
'.postcssrc.json',
25
+ 'postcss.config.js',
26
];
27
const tailwindConfigFiles: string[] = [
28
'tailwind.config.js',
@@ -88,7 +89,9 @@ export async function loadPostcssConfiguration(
88
89
return undefined;
90
}
91
- const raw = await readPostcssConfiguration(configPath);
92
+ const raw = configPath.endsWith('.js')
93
+ ? require(configPath)
94
+ : await readPostcssConfiguration(configPath);
95
96
// If no plugins are defined, consider it equivalent to no configuration
97
if (!raw.plugins || typeof raw.plugins !== 'object') {
0 commit comments