Commit Graph

5 Commits

Author SHA1 Message Date
Nathan Rajlich
f6f16b0347 [remix] Fix ESM mode for Edge runtime, add Remix v2 E2E test (#10530)
Similar to the default import fix from #10525 which was for Node runtime, but this one fixes Edge runtime.

Also adds an E2E test for Remix v2, including both a Node route and Edge route.
2023-09-18 18:26:53 +00:00
Nathan Rajlich
cb784aeb9c [remix] Fixes for Remix v2 (#10525)
The Remix v2 template now uses `"type": "module"` by default, so adjust our bundling logic to account for that possibility.
2023-09-18 14:32:08 +00:00
Michaël De Boey
604f3b8d83 fix(remix): update entry.client.react.jsx (#9845)
Bring in line with Remix defaults

https://github.com/remix-run/remix/blob/main/packages/remix-dev/config/defaults/entry.client.react-stream.tsx
2023-04-23 19:35:31 -07:00
Nathan Rajlich
ce25dec97d [remix] Inject @vercel/remix package instead of @vercel/remix-entry-server (#9684)
The `handleRequest()` function has been moved to the `@vercel/remix` package, so we can deprecate `@vercel/remix-entry-server` entirely and install `@vercel/remix` in the project instead, when there is no `app/entry.server.tsx` file defined in the project already.
2023-03-22 01:06:14 +00:00
Nathan Rajlich
13d54b2095 [remix] Support optional entry.{server,client}.tsx file (#9620)
Remix v1.14.0 added support for having no `app/entry.server.tsx`/`app/entry.client.tsx` files in a project (there are default versions bundled into `@remix-run/dev`). Projects configured like this are currently failing because we symlink our forked version of the `remix` CLI into the project, so it cannot resolve the necessary modules at build time.

To solve this, instead of relying on the default versions of these files in `@remix-run/dev` package, we'll include our own versions in `@vercel/remix`, and physically copy them into the project dir. This way, the modules used will be properly resolved relative to the project's own `node_modules` dir.

Our default version of `app/entry.server.tsx` is also slightly different then upstream one, because it uses `@vercel/remix-entry-server` to enable isomorphic React streaming on both Node + Edge runtimes. Because of this, if that dependency is not present, then we'll automatically install the dependency at build-time.
2023-03-13 20:47:56 +00:00