0
votes

I'm following these 2 examples to setup a Nextjs + Tailwindcss + Antd project:

I'm able to yarn dev with no issue, but when I tried to yarn build and yarn start the project, antd's css is missing.

Here's my repo to reproduce the issue.

Edit: I found out that when I remove the purge css plugin in postcss.config.js the issue is resolved. So the issue is purge css purged all external css files when yarn build. How should I update the postcss config?

Edit 2: Trying to ignore purging for external files didn't work:

/* purgecss start ignore */
@tailwind base;
@tailwind components;
@import '~antd/dist/antd.css';
/* purgecss end ignore */