[remix] Split Edge and Node server builds using serverBundles config (#9504)

Utilize the [`serverBundles`](https://github.com/remix-run/remix/pull/5479) config option to generate two server bundle builds. One contains only the routes that should run in Node.js, and the other contains only the routes that should run in the Edge runtime. In the future we could update this configuration to generate more than two bundles to be more granular and allow for infinite scalability.

Because the `serverBundles` PR is not yet merged, this PR introduces usage of a forked version of `@remix-run/dev` which incorporates our changes. Hopefully usage of a fork is temporary, but it gets us unblocked for now.
This commit is contained in:
Nathan Rajlich
2023-02-28 19:10:42 -08:00
committed by GitHub
parent 1ca3704297
commit 61de63d285
12 changed files with 1885 additions and 2078 deletions

View File

@@ -72,6 +72,14 @@ describe('getPathFromRoute()', () => {
parentId: 'root',
file: 'routes/$.tsx',
},
'routes/nested/index': {
path: 'nested',
index: true,
caseSensitive: undefined,
id: 'routes/nested/index',
parentId: 'root',
file: 'routes/nested/index.tsx',
},
};
it.each([
@@ -79,6 +87,7 @@ describe('getPathFromRoute()', () => {
{ id: 'routes/__pathless', expected: '' },
{ id: 'routes/index', expected: 'index' },
{ id: 'routes/api.hello', expected: 'api/hello' },
{ id: 'routes/nested/index', expected: 'nested' },
{ id: 'routes/projects', expected: 'projects' },
{ id: 'routes/projects/__pathless', expected: 'projects' },
{ id: 'routes/projects/index', expected: 'projects' },