Closed amosbastian closed 10 months ago
Thanks for reporting the issue! I don't get this when using the plugin in a Vite or Astro app, so it might be something related to webpack... I'll dig a bit deeper when I get some time
Thanks for reporting the issue! I don't get this when using the plugin in a Vite or Astro app, so it might be something related to webpack...
Getting similar error in a Remix app with v0.2.1 of typography:
✘ [ERROR] [plugin css-file] Build failed with 1 error: node_modules/windy-radix-typography/index.js:14:47: ERROR: [plugin: postcss-plugin] Cannot read properties of undefined (reading 'replace')
This issue would occur in v0.x of windy-radix-typography, when trying to calculate the CSS property name of a given color. When customizing the available colors of windy-radix-palette, if some of the colors that the typography plugin was expecting to be available weren't listed, then it would try to look up this color, but fail.
I've since rewritten windy-radix-typography to be a Tailwind preset instead of a plugin, and as part of this rewrite, removed the bit of code that used to throw this error.
The preset now uses Tailwind's theme
function to look up the colors used in the typography themes, so I'm anticipating that this issue will no longer occur with windy-radix-typography >= v1.0.0-beta.x
Loading the plugin works fine, but when I change my tailwind config to only include specific colours:
I get the following error:
For context I am using it in an Nx monorepo with Next.js' app directory