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: ssr incompatibility with vite 4 #345

Merged
merged 3 commits into from
Mar 16, 2023
Merged

Conversation

ElMassimo
Copy link
Owner

Description 📖

This pull request fixes an incompatibility in vite-plugin-ruby with Vite 4 when building for SSR, caused by the changes in:

Background 📜

This was happening because we were configuring different assetFilenames for a normal build than for SSR.

Since vite-plugin-ruby's overrides matched the convention in Vite 3, this bug did not manifest until vitejs/vite#10927, when the convention was changed from [name].[hash].[extname] to [name]-[hash].[extname].

The Fix 🔨

Using the same assetFilename for normal and SSR builds.

Additionally, we no longer specify the fileName for assets emitted in vite-plugin-ruby, allowing Rollup to use the configured assetFilename.

@ElMassimo ElMassimo changed the title fix: ssr incompatibility with vite 4 (close #333) fix: ssr incompatibility with vite 4 Mar 16, 2023
@ElMassimo ElMassimo merged commit 3491bde into main Mar 16, 2023
@ElMassimo ElMassimo deleted the fix/ssr-asset-filenames branch March 16, 2023 16:59
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.

1 participant