Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(vite): rewrite ssr asset hash #567

Closed
wants to merge 1 commit into from
Closed

Conversation

antfu
Copy link
Member

@antfu antfu commented Sep 24, 2021

When using Vite with ssr enabled. Assets path are hashed which make the dev server failed to find the file.

This PR using ssr-manifest gets the asset mapping the rewrites the URL with a server middleware to serve the correct file.

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c56b005
Status: ✅  Deploy successful!
Preview URL: https://3c1cf7ef.framework-1rm.pages.dev

View logs

@pi0 pi0 added the pending label Sep 24, 2021
@pi0
Copy link
Member

pi0 commented Sep 24, 2021

I guess by backporting nuxt/vite#201 this problem will be resolved.

@pi0
Copy link
Member

pi0 commented Sep 30, 2021

Confirm issue is gone (on nuxt-vite main with new implementation). Moving to #604

@pi0 pi0 closed this Sep 30, 2021
@pi0 pi0 deleted the fix/vite-ssr-assets-hash branch September 30, 2021 19:58
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants