Minor Changes
-
BREAKING CHANGE: Remix app scaffolding,
remix doctor, andremix routesnow useapp/actionswith controller files only. The oldapp/controllersdirectory name has been replaced byapp/actions, and root route actions should no longer live in standalone files.When upgrading an app, move
app/controllerstoapp/actions, then consolidate root leaf route files intoapp/actions/controller.tsx. For example, old files likeapp/controllers/home.tsx,app/controllers/about.tsx, orapp/controllers/uploads.tsshould becomehome,about, anduploadsentries in the root controller'sactionsobject. Root controller tests should follow the same shape and live inapp/actions/controller.test.tsorapp/actions/controller.test.tsx.Nested route maps should live under directories named for route-map keys, not URL path segments. For example,
routes.authis owned byapp/actions/auth/controller.tsx, androutes.account.settingsis owned byapp/actions/account/settings/controller.tsx. Keep route-local pages, schemas, helpers, and tests beside the controller that owns them, but move shared cross-route UI toapp/ui.This migration also changes how apps should call
router.map(). A controller owns the direct leaf routes in the route map passed torouter.map():router.map(routes, rootController)maps only direct leaf routes in the root route map, so nested route-map keys such asauth,account, oradmindo not belong in the root controller'sactionsobject. Map every nested route map explicitly inapp/router.ts:router.map(routes, rootController) router.map(routes.auth, authController) router.map(routes.account, accountController) router.map(routes.account.settings, accountSettingsController)
Controller middleware applies only to the direct actions in that controller. Middleware on
app/actions/controller.tsxapplies only to the direct root actions in that controller; it does not protect controllers registered for nested route maps. If an app previously relied on middleware from one controller to protect another controller, copy the relevant middleware to each controller that needs it, such asapp/actions/account/controller.tsxandapp/actions/account/settings/controller.tsx.After moving files, remove nested route-map keys and unknown action keys from every controller. Each controller's
actionsobject should contain exactly the direct leaf route keys for the route map passed to the matchingrouter.map()call.The default template now starts with a single home route. Shared HTML rendering should live in middleware and be read from request context with
context.render, matching the default template'sapp/middleware/render.tsxpattern. -
Updated the default
remix newapp template to serve static assets frompublic/, include a Remix favicon, and share the generated document shell between the starter home page and future routes.
Patch Changes
-
Fixed CLI argument edge cases so
--separators still work after global options, completion help can be requested after a shell name, andremix testcompletions no longer duplicate--help. -
Changed the default
remix newserver template to useremix/node-fetch-serverinstead ofremix/node-serve, avoiding the native uWebSockets.js transport for freshly scaffolded apps. -
Fixed
remix newso scaffolded apps include the template.gitignorefile from the published CLI package. -
Simplified the default app template asset server configuration so workspace installs serve package imports through
node_moduleswithout Remix monorepo-specific../packagesrules. -
Simplified the default
remix newhome page so it relies on the shared document title default instead of duplicating app display-name decoding in the scaffold page module. -
Removed unused frame resolver plumbing from the default
remix newapp template while keeping the client-entry setup used for isolated browser interactivity. -
Updated the default app template's Remix agent skill so code agents can discover the available
remix/*README files shipped innode_modules/remix. -
Improved the packaging flow for the
remix newapp template so the template can run directly as a root workspace during development while still being included in the published CLI package. -
Bumped
@remix-run/*dependencies: