Skip to content

Migrate from Remix v1 to v2 #28

@mmcky

Description

@mmcky

Summary

Remix v1.17 (released 2023) is end-of-life. The ecosystem has moved to Remix v2 / React Router v7. This repo needs a coordinated migration.

Dependabot PRs #18 and #19 attempted to bump individual @remix-run/* packages from v1 to v2 but were closed — this migration cannot be done piecemeal.

Packages to Upgrade

All @remix-run/* packages must be upgraded together:

Package Current Target
@remix-run/react 1.17.1 2.x
@remix-run/node 1.17.1 2.x
@remix-run/dev 1.17.1 2.x
@remix-run/serve 1.17.1 2.x
@remix-run/css-bundle 1.17.1 2.x
@remix-run/eslint-config 1.17.1 2.x

Migration Steps

Based on the Remix v2 upgrade guide:

  1. Audit @myst-theme compatibility@myst-theme/* v0.14.0 may depend on Remix v1 APIs. Check if upstream supports v2 before proceeding.
  2. Enable v2 future flags — Already partially done (v2_routeConvention, v2_errorBoundary, v2_normalizeFormMethod, etc. are enabled in remix.config.dev.js). Verify all flags are set.
  3. Migrate configremix.config.js (CJS) → vite.config.ts. Remove the separate dev/prod config pattern.
  4. Update route conventions — Verify existing routes in app/routes/ follow v2 flat-file conventions (they likely already do given the future flags).
  5. Update imports — Some APIs moved between packages in v2.
  6. Update entry.server.tsx and entry.client.tsx — v2 has updated entry file patterns.
  7. Test thoroughly — No CI exists yet (tracked separately), so manual testing is essential.

Positive Signs

The current codebase already enables several v2 future flags in remix.config.dev.js:

  • v2_routeConvention
  • v2_errorBoundary
  • v2_normalizeFormMethod
  • v2_meta

This means much of the migration groundwork is already in place.

Blocker

@myst-theme compatibility must be verified first. If @myst-theme/* v0.14.0 doesn't support Remix v2, this migration is blocked until upstream updates.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions