Next.js Discord

Discord Forum

how to use tailwindcss with nextjs mdx

Answered
Vicente Sanchez posted this in #help-forum
Open in Discord
Hey there,

i'm bulding my portifolios blog feature and i was having trouble to use tailwindcss into the customization of the native html components.

https://x.com/vicentesandev/status/1873787531239841865

does any one knows if is there any way of using tailwindcss with next-mdx?
Answered by Vicente Sanchez
solution: the location of your MDX file must be included in the tailwind.config.ts file
View full answer

2 Replies

solution: the location of your MDX file must be included in the tailwind.config.ts file
Answer
Siamese Crocodile
Yes... update your tailwind.config.js file to ... (something similar to this)
  content: [
    "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
  ],