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

fix: keep server assets on server build #1258

Merged
merged 4 commits into from
Feb 22, 2025

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Feb 22, 2025

While trying to come up with a simpler example, I realized that server-only asset concept doesn't actually exist as a builtin Vite feature and this can be only achieved by using Rollup's emitFile + import.meta.ROLLUP_FILE_URL_(id) feature on Vite ssr build via custom plugin. So, I think cloudflare wasm import scenario I mentioned in the issue is fairly an edge case.

Nonetheless, there might be other vite/rollup plugins relying on ROLLUP_FILE_URL feature on server build, so simply replacing rename with copyFile to save this specific case might be still worth it.

Copy link

vercel bot commented Feb 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
waku ⬜️ Ignored (Inspect) Visit Preview Feb 22, 2025 8:39am

Copy link

codesandbox-ci bot commented Feb 22, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@hi-ogawa hi-ogawa marked this pull request as ready for review February 22, 2025 07:47
@dai-shi dai-shi mentioned this pull request Feb 22, 2025
Copy link
Owner

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for your contribution!

@dai-shi dai-shi merged commit 0f09d95 into dai-shi:main Feb 22, 2025
26 checks passed
@hi-ogawa hi-ogawa deleted the fix-keep-server-asset-on-server-build branch February 23, 2025 00:55
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

Successfully merging this pull request may close these issues.

2 participants