Skip to content

Commit 229b198

Browse files
v3: Bundle postcss-load-config v4 with the standalone CLI (#19042)
Unfortunately, it’s not possible to intercept the `await import(…)` used by newer versions. This means the Standalone CLI will not be able to load ESM postcss config files. You still will using the npm package and newer versions of Node.js.
1 parent 11de06f commit 229b198

File tree

3 files changed

+91
-0
lines changed

3 files changed

+91
-0
lines changed

standalone-cli/package-lock.json

Lines changed: 85 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

standalone-cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"jest": "^27.5.1",
2424
"move-file-cli": "^3.0.0",
2525
"pkg": "^5.8.1",
26+
"postcss-load-config": "^4.0.2",
2627
"rimraf": "^3.0.2",
2728
"tailwindcss": "file:.."
2829
},

standalone-cli/standalone.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ let localModules = {
1818
},
1919
'@tailwindcss/typography': require('@tailwindcss/typography'),
2020

21+
// This force-loads the v4 version instead of the v6 one at the repo root
22+
'postcss-load-config': require('postcss-load-config'),
23+
'postcss-load-config/src/options': require('postcss-load-config/src/options'),
24+
'postcss-load-config/src/plugins': require('postcss-load-config/src/plugins'),
25+
2126
// These are present to allow them to be specified in the PostCSS config file
2227
autoprefixer: require('autoprefixer'),
2328
tailwindcss: require('tailwindcss'),

0 commit comments

Comments
 (0)