Skip to content

Commit

Permalink
default getManifest / getBuildTimeServerManifestAsync / createRoutesM…
Browse files Browse the repository at this point in the history
…anifest to platform web
  • Loading branch information
marklawlor committed Mar 6, 2024
1 parent cd2bb5c commit 6abf431
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/expo-router/build/routes-manifest.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/expo-router/build/routes-manifest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/expo-router/build/routes-manifest.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions packages/expo-router/build/static/renderStaticContent.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/expo-router/src/routes-manifest.ts
Expand Up @@ -33,6 +33,7 @@ export function createRoutesManifest(paths: string[]): ExpoRoutesManifestV1 | nu
preserveApiRoutes: true,
ignoreRequireErrors: true,
ignoreEntryPoints: true,
platform: 'web',
});

if (!routeTree) {
Expand Down
11 changes: 9 additions & 2 deletions packages/expo-router/src/static/renderStaticContent.tsx
Expand Up @@ -27,7 +27,11 @@ AppRegistry.registerComponent('App', () => ExpoRoot);

/** Get the linking manifest from a Node.js process. */
async function getManifest(options: Parameters<typeof getRoutes>[1] = {}) {
const routeTree = getRoutes(ctx, { preserveApiRoutes: true, ...options });
const routeTree = getRoutes(ctx, {
preserveApiRoutes: true,
platform: 'web',
...options,
});

if (!routeTree) {
throw new Error('No routes found');
Expand All @@ -49,7 +53,10 @@ async function getManifest(options: Parameters<typeof getRoutes>[1] = {}) {
async function getBuildTimeServerManifestAsync(
options: Parameters<typeof getRoutes>[1] = {}
): Promise<ExpoRouterServerManifestV1> {
const routeTree = getRoutes(ctx, options);
const routeTree = getRoutes(ctx, {
platform: 'web',
...options,
});

if (!routeTree) {
throw new Error('No routes found');
Expand Down

0 comments on commit 6abf431

Please sign in to comment.