-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
The installation guide of Tailwind CSS with Gatsby framework is missing some information that is required when someone creates a Gatsby theme
with Tailwind CSS.
After following the installation guide, when running the project the build fails because Gatsby is not able to find the tailwind.config.js
file in the project that depends on the Gatsby theme build with Tailwind CSS.
To reproduce:
- Create a test Gatsby theme and configure Tailwind CSS as per the documentation.
- Install the theme in a new Gatsby site
- Start the server
Error:
ERROR in ../<theme-directory>/src/styles/global.css
Module build failed (from ../node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from
../node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js):
TypeError: Cannot read properties of undefined (reading 'config')
at getTailwindConfig
....
To fix this, we need to include the tailwind.config.js
file in postcss.config.js
.
I am interested to update the documentation with the relevant information.
GregorShear, JoanKinyanjui and amozoss
Metadata
Metadata
Assignees
Labels
No labels