Closed claytonchew closed 1 month ago
Seems like it is resolved by having it built twice (one after the other).
npm run build
npm run build
My workaround:
npm run prepare
npm run build
Can we close this? Have you made sure to register the @nuxt/content
before @nuxt/ui
?
I didn't touch the module orders. Official sites like @nuxt/content
have the same issue:
Nuxt Image:
Are you deploying on Cloudflare?
Yes. I can also reproduce locally if I run nuxi cleanup
before build. It will also show the following warning during build:
warn - The `purge`/`content` options have changed in Tailwind CSS v3.0.
warn - Update your configuration file to eliminate this warning.
warn - https://tailwindcss.com/docs/upgrade-guide#configure-content-sources
If I build another time with cache in .nuxt
, this warning disappears and no issue occurs.
This is due to how the @nuxtjs/tailwindcss
module works since https://github.com/nuxt-modules/tailwindcss/releases/tag/v6.12.0. We've been having lots of issues with this..
Thanks for pointing out this. Maybe we can close this and track at https://github.com/nuxt-modules/tailwindcss/issues/855 ? Since we have workarounds mentioned above.
As @kingyue737 mentioned, a nuxt prepare
is required so you can add a postinstall
script in your package.json
like: https://github.com/nuxt-ui-pro/docs/blob/main/package.json#L10
Issue
Not all icons were bundled (missing) during build, some icons were missing when run on production.
Outcome is the same with
❌
npm run build
thennode .output/server/index.mjs
locally. ❌ docker build and runReproduction
Start completely from fresh project
Run build
Run server locally