nuxt-ui-pro / docs

A documentation template made with Nuxt UI Pro.
https://docs-template.nuxt.dev
134 stars 38 forks source link

Not all icons were bundled during build (tested with fresh project) #59

Closed claytonchew closed 1 month ago

claytonchew commented 4 months ago

Issue

Not all icons were bundled (missing) during build, some icons were missing when run on production.

SCR-20240508-skjj

SCR-20240508-sklb

SCR-20240508-skrv

Outcome is the same with

npm run build then node .output/server/index.mjs locally. ❌ docker build and run

Reproduction

Start completely from fresh project

npx nuxi init -t github:nuxt-ui-pro/docs

Run build

npm run build

Run server locally

node .output/server/index.mjs
claytonchew commented 4 months ago

Seems like it is resolved by having it built twice (one after the other).

npm run build
npm run build
kingyue737 commented 2 months ago

My workaround:

npm run prepare
npm run build 
benjamincanac commented 1 month ago

Can we close this? Have you made sure to register the @nuxt/content before @nuxt/ui?

kingyue737 commented 1 month ago

I didn't touch the module orders. Official sites like @nuxt/content have the same issue:

image

kingyue737 commented 1 month ago

Nuxt Image:

image

benjamincanac commented 1 month ago

Are you deploying on Cloudflare?

kingyue737 commented 1 month ago

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.

benjamincanac commented 1 month ago

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..

kingyue737 commented 1 month ago

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.

benjamincanac commented 1 month ago

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