TryGhost
OSS
Ghost
Fixed postcss plugin resolution for consumers of the design system config - admin-x-settings re-exports the design system's postcss.config.cjs, but the config named its plugins as strings. postcss-load-config resolves string plugin names relative to the searchPath (the consuming package), not the file that declared them, so it looked for postcss-import, @tailwindcss/postcss and autoprefixer under apps/admin-x-settings, which does not declare them. Under pnpm's strict isolation they are not linked there, so the lookup failed with "Loading PostCSS Plugin failed: Cannot find module 'postcss-import'". - Requiring the plugins in the config file itself anchors resolution to the design system, which does declare all three. The plugin list is now passed as instances, so no string resolution happens at the consumer at all. - Preferred over adding postcss-import et al as devDependencies of every consumer: that papers over the resolution bug and would have to be repeated for each new package that reuses this config. - Preferred over deleting the config: it is not vestigial. The design system and admin-x-settings still build standalone bundles through postcss, and the pipeline expands `@import 'tailwindcss/utilities.css'` into ~470kB of CSS. Dropping it would silently strip every utility class from those bundles. - Verified the emitted CSS is unchanged: the postcss product is byte-identical and admin-x-settings/dist is unchanged across all 31 files.
nx run ghost:build:assets
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx run ghost:build:assets
Click to copy
Linux
4 CPU cores
ca83fcf9
29185