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

⏩ Use vite instead of Remix Classic Compiler (3) #410

Draft
wants to merge 24 commits into
base: agoose77/feat-use-v2
Choose a base branch
from

Conversation

agoose77
Copy link
Collaborator

This PR works towards using Vite instead of the Remix Classic Compiler. From reading, it seems like only Vite supports changing the base path, which I think is a required solution to the v2 redirect problem (actually serve the theme from the base path it will be served from)

As this is an iterative PR, here are some findings:

  • Switch to Vite configuration
  • Split server and client loaders
  • Drop LiveReload (Vite has HMR)

@agoose77
Copy link
Collaborator Author

This snapshot "works", but the static deployment is broken. I need to figure out the following:

  • A sensible path to resolve ESM-CJS conflicts
  • Why do we need to enable legacy routing when we opted in to v2 routing before the upgrade?
  • Whether setting the base path works for static exports

This is all confusing stuff; there are so many interacting layers. But I think that's mainly a function of my knowledge rather than the problem at large.

@agoose77
Copy link
Collaborator Author

So it looks like the v1-v2 routing thing was maybe a fluke? I sat back down to the branch today and it broke the navigation.

Without that change, navigation and link-intent from non-index pages works, but the index seems to trigger a reload.

@agoose77
Copy link
Collaborator Author

agoose77 commented Jun 24, 2024

Looks like the redirect phenomenon is actually @remix-run/react triggering a reload when it fails to dynamically import the route module. I set a breakpoint on that particular piece of logic in the browser.

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.

None yet

1 participant