Skip to content

Commit c5855f0

Browse files
authored
Calypso Build: Fix PostCSS config path default (#37110)
Turns out the `undefined` fallback doesn't work so well after all: See Automattic/jetpack#13854 which currently fails to find a PostCSS config. I tried various other fixes (setting different levels of config options to `undefined` or empty object), but none seemed to work. The fix I ended up was the only reliable way I could find.
1 parent 172017c commit c5855f0

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packages/calypso-build/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 5.0.1
2+
3+
- Fix PostCSS config path default.
4+
15
# 5.0.0
26

37
- Remove `@automattic/calypso-color-schemes` dependency

packages/calypso-build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@automattic/calypso-build",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"description": "Shared Calypso build configuration files",
55
"keywords": [
66
"babel",

packages/calypso-build/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function getWebpackConfig(
7474
let postCssConfigPath = process.cwd();
7575
if ( ! fs.existsSync( path.join( postCssConfigPath, 'postcss.config.js' ) ) ) {
7676
// Default to this package's PostCSS config
77-
postCssConfigPath = undefined;
77+
postCssConfigPath = __dirname;
7878
}
7979

8080
const webpackConfig = {

0 commit comments

Comments
 (0)