You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried the with-tailwindcss example, one of the official examples. It was rendered on the development server correctly. Then I generated a static site from it, but the CSS was not exported. Thus the static site was not rendered correctly.
I have avoided this problem by exporting CSS by the tailwind command and reading the generated CSS in the pages/_document.js, but this solution left a huge raw CSS in the HTML. This solution is not smart.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm now learning next.js.
I tried the
with-tailwindcss
example, one of the official examples. It was rendered on the development server correctly. Then I generated a static site from it, but the CSS was not exported. Thus the static site was not rendered correctly.I have avoided this problem by exporting CSS by the
tailwind
command and reading the generated CSS in thepages/_document.js
, but this solution left a huge raw CSS in the HTML. This solution is not smart.Are there better solutions to this problem?
Thank you for your reading.
Beta Was this translation helpful? Give feedback.
All reactions