-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cli][start] Added interstitial middleware #16560
[cli][start] Added interstitial middleware #16560
Conversation
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
packages/expo/cli/start/server/middleware/InterstitialPageMiddleware.ts
Outdated
Show resolved
Hide resolved
packages/expo/cli/start/server/middleware/InterstitialPageMiddleware.ts
Outdated
Show resolved
Hide resolved
// Production: This will resolve when installed in the project. | ||
resolveFrom.silent(this.projectRoot, 'expo/static/loading-page/index.html') ?? | ||
// Development: This will resolve when testing locally. | ||
require.resolve('../../../../../static/loading-page/index.html'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for require.resolve -- use path.resolve(__dirname, stuff)
. That said, path.join(require.resolve('expo'), 'static/loading-page/index.html')
may work and be more robust.
packages/expo/cli/start/server/middleware/InterstitialPageMiddleware.ts
Outdated
Show resolved
Hide resolved
packages/expo/cli/start/server/middleware/__tests__/InterstitialPageMiddleware-test.ts
Show resolved
Hide resolved
packages/expo/cli/start/server/middleware/__tests__/InterstitialPageMiddleware-test.ts
Outdated
Show resolved
Hide resolved
packages/expo/cli/start/server/middleware/RuntimeRedirectMiddleware.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: James Ide <ide@users.noreply.github.com>
0a037b0
to
69796a5
Compare
…eware.ts Co-authored-by: James Ide <ide@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Change oversized Base64 icon for SVG
- Replace require.resolve with path.resolve(__dirname) -- require() goes away with ESM
Co-authored-by: James Ide <ide@users.noreply.github.com>
Why
How
Test Plan