Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
claytonchew opened this issue May 8, 2024 · 10 comments
Closed

Comments

@claytonchew
Copy link

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
Copy link
Author

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

npm run build
npm run build

@kingyue737
Copy link

My workaround:

npm run prepare
npm run build 

Copy link
Contributor

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

@kingyue737
Copy link

kingyue737 commented Jul 11, 2024

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

image

@kingyue737
Copy link

Nuxt Image:

image

Copy link
Contributor

Are you deploying on Cloudflare?

@kingyue737
Copy link

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.

Copy link
Contributor

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
Copy link

kingyue737 commented Jul 11, 2024

Thanks for pointing out this. Maybe we can close this and track at nuxt-modules/tailwindcss#855 ? Since we have workarounds mentioned above.

@benjamincanac benjamincanac closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants