tailwind styles not being applied to mdx content
Answered
Rex posted this in #help-forum
RexOP
Hey guys, I am following nextjs official docs on setting up mdx pages, everything working fine except the tailwind styles to custom components isn't being applied.
Following is the link to codesandbox:
https://codesandbox.io/p/github/bibaswan7/blog-temp/master?import=true
I tried going through docs, Leerob's blog github repo but nothing seems to be working
Following is the link to codesandbox:
https://codesandbox.io/p/github/bibaswan7/blog-temp/master?import=true
I tried going through docs, Leerob's blog github repo but nothing seems to be working
Answered by joulev
add
"./mdx-components.tsx",
to the content
array in tailwind.config.ts
2 Replies
@Rex Hey guys, I am following nextjs official docs on setting up mdx pages, everything working fine except the tailwind styles to custom components isn't being applied.
Following is the link to codesandbox:
https://codesandbox.io/p/github/bibaswan7/blog-temp/master?import=true
I tried going through docs, Leerob's blog github repo but nothing seems to be working
add
"./mdx-components.tsx",
to the content
array in tailwind.config.ts
Answer
@joulev add `"./mdx-components.tsx",` to the `content` array in `tailwind.config.ts`
RexOP
thanks joulev, its working now. They should have mentioned this part in the official docs