History log of /expo/packages/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts (Results 1 – 25 of 39)
Revision Date Author Comments
# 1a3a1db5 20-Sep-2023 Evan Bacon <[email protected]>

Update tsconfigs to node 18 (current LTS) (#24471)

# Why

Expo supports Node.js LTS, this is currently Node 18. This PR updates
from 14 to 18.

<!--
Please describe the motivation for this PR,

Update tsconfigs to node 18 (current LTS) (#24471)

# Why

Expo supports Node.js LTS, this is currently Node 18. This PR updates
from 14 to 18.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 2d4e7de9 18-Sep-2023 Evan Bacon <[email protected]>

router v3 public fixes (#24472)

# Why

- Some small fixes for Expo Router v3 based on the alpha release

---------

Co-authored-by: Expo Bot <[email protected]>


# 46f023fa 15-Sep-2023 Evan Bacon <[email protected]>

[RFC] API Routes in Expo Router (#24429)

# Why

Servers are an important part of developing many different types of
apps, but they're much harder to configure than they need to be.

API Routes

[RFC] API Routes in Expo Router (#24429)

# Why

Servers are an important part of developing many different types of
apps, but they're much harder to configure than they need to be.

API Routes will enable users to express some abstract JavaScript code
that runs in a server by simply creating a file in the app directory,
and adding the `+api.js` suffix. For example, to securely interact with
OpenAI, simply:

```ts
// app/generate+api.ts
import { ExpoRequest, ExpoResponse } from 'expo-router/server';

export async function POST(req: ExpoRequest): Promise<ExpoResponse> {
const { prompt } = await req.json();

const json = await fetch('https://api.openai.com/v1/engines/text-davinci-003/completions', {
headers: {
'Content-Type': 'application/json',
// `OPENAI_API_KEY` is pulled from the .env file when running in Expo CLI.
Authorization: `Bearer ${process.env.OPENAI_API_KEY ?? ''}`,
},
method: 'POST',
body: JSON.stringify({
prompt,
max_tokens: 100,
}),
}).then(res => res.json());

// Return as JSON
return ExpoResponse.json(json);
}
```

This will be served at `http://localhost:8081/generate` with `npx expo`
and can be used by making a request:

```sh
$ curl -X POST -H "Content-Type: application/json" -d \'{"prompt":"Hello, my name is"}\' http://localhost:8081/generate
```

Expo Router polyfills the URL and `window.location` object on native to
allow for universally requesting with a relative URL:

```js
// Expo prepends the host and port to the URL automatically in development.
const json = await fetch('/generate').then(res => res.json());
```

# How

- API Routes are bundled with Metro, leveraging all the same
functionality as the rest of the app and website.
- The project babel config is used to transpile the API routes.
Indication is passed to the Babel caller via the `isServer` boolean.
This can be used to change the preset based on the environment.
- Each API route is bundled into a standalone file in the `dist/_expo`
directory. This is akin to ncc, the tool we use to make Create Expo App
download in ~1 second.
- Create a new package `@expo/server` which includes the requisite
middleware and runtime polyfills for the Expo server environment.
- Add a new routes manifest which will be used by `@expo/server` to
serve up the three types of routes: HTML routes, API routes, and not
found routes (404s).
- Add a new export `expo-router/server` (potentially will be moved to
`expo/server`) which contains the `ExpoRequest` and `ExpoResponse`
objects. These are all based on the WinterCG specification, and include
some additional properties for interop with the Expo Router filesystem
convention. These are inspired by Remix, SvelteKit, and Next.js for
simplicity.
- Add a new export mode `web.output: "server"` which can be used to
export a dynamic server. Note: I may drop this for now and make server
the default since there's no expo-specific hosting code that must be
exported.
- This PR adds the ability to host the app with an express server,
different production adapters to follow.

# Test Plan

In addition to all the E2E Metro tests, I've added a new E2E runner
which starts a server and pings different requests to ensure expected
behavior. These run in the CLI as opposed to the `@expo/server` package.

- resolve ENG-10057 ENG-8243 ENG-8082 ENG-8079 ENG-8242 ENG-8081
ENG-8080 ENG-9625

---------

Co-authored-by: Expo Bot <[email protected]>
Co-authored-by: Cedric van Putten <[email protected]>

show more ...


# 7c98c357 14-Sep-2023 Evan Bacon <[email protected]>

feat(cli, router, metro, asset): add basePath support (#23911)

# Why

- Add the ability to export websites for hosting from a custom path.
This is required for GitHub pages.
- Resolve ENG-9193

feat(cli, router, metro, asset): add basePath support (#23911)

# Why

- Add the ability to export websites for hosting from a custom path.
This is required for GitHub pages.
- Resolve ENG-9193
- Resolve https://github.com/expo/expo/issues/20562
- Resolve https://github.com/expo/router/issues/165

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

- Add `expo.experiments.basePath` which can be used during `npx expo
export` to modify how assets are referenced.
- Set the `publicPath` in Metro to output as expected.
- Add custom asset writing for web to support stripping the unused
prefix.

- It's unclear if this should also apply to native, and if we should
have platform-specific variations.
- Update Expo Router to support automatically adjusting paths to support
basePath in production builds.
<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

- [ ] New `expo export` test.

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <[email protected]>
Co-authored-by: Aman Mittal <[email protected]>

show more ...


# edeec536 06-Sep-2023 Evan Bacon <[email protected]>

chore(cli): delete @expo/dev-server (#24272)

# Why

- I tried this before but the logs endpoint was blocking it.
- I forked the dev server when I wrote the original `expo/cli`, been
meaning to d

chore(cli): delete @expo/dev-server (#24272)

# Why

- I tried this before but the logs endpoint was blocking it.
- I forked the dev server when I wrote the original `expo/cli`, been
meaning to delete the original for a while. The duplicate code and
indirection is making the new server features harder to implement.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

- Copy/paste remaining code from `@expo/dev-server` in to `@expo/cli`.
- Delete `@expo/dev-server`.
- Drop unused `/logs` and json parser middleware.
- Drop logging mocks.
- Drop experimental Webpack native support.
- Drop legacy react-native middleware support (no longer needed since
everything is versioned).

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

- Tests should keep passing.
- Need to do some actual runs since there aren't any e2e tests for
various parts of dev-server.

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 573b0ea7 01-Sep-2023 Evan Bacon <[email protected]>

feat(metro, cli, router): production static web source maps support (#24213)

# Why

- Add support for exporting (or skipping) optimally formatted source
maps on web with static rendering enabled.

feat(metro, cli, router): production static web source maps support (#24213)

# Why

- Add support for exporting (or skipping) optimally formatted source
maps on web with static rendering enabled.
- Improved version of https://github.com/expo/expo/pull/22334

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

- Pass a new setting to the custom serializer when exporting for usage
outside of the dev server. This setting will ensure a source map is
created with paths relative to the server root.
- The resources will be adjusted after exporting to reflect the hashed
js filename location.
- When no sourcemap exporting is enabled, the references will be
stripped to prevent getting a chrome warning.


<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

- I added an e2e bundling test for both exporting with and without
sourcemaps.

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 429dc7fc 26-Aug-2023 Evan Bacon <[email protected]>

fix(expo, asset, cli)!: unify asset hashing (#24090)

# Why

Convert the `../` segments of the server URL to `_` to support
monorepos. This same transformation takes place in
`AssetSourceResolver

fix(expo, asset, cli)!: unify asset hashing (#24090)

# Why

Convert the `../` segments of the server URL to `_` to support
monorepos. This same transformation takes place in
`AssetSourceResolver.web` (expo-assets, expo-image) and
`persistMetroAssets` of Expo CLI, this originally came from the [Metro
opinion](https://github.com/react-native-community/cli/blob/2204d357379e2067cebe2791e90388f7e97fc5f5/packages/cli-plugin-metro/src/commands/bundle/getAssetDestPathIOS.ts#L19C5-L19C10).

The purpose is to ensure no URL like `/foo/../bar.png` is requested, as
the result would be `/bar.png` which wouldn't work. The of how to handle
this didn't come from us, but we do need to ensure it's unified. At a
high-level, this does prevent the usage of certain files, as
`/foo/../bar.png` will be `/foo/_bar.png`, meaning a file named
`/foo/_bar.png` cannot also exist. This logic, while applied at runtime,
is actually only valid for production exports as we don't move or alias
files in development. The only way to have valid development files is to
ensure `../` never appears in the URL, i.e. by using
`unstable_serverRoot`.

- Drop legacy `expo/tools/hashAssetFiles.js` in favor of `expo-asset`
version.
- Unify runtime logic of asset file loading for monorepos.
- Split out of https://github.com/expo/expo/pull/23911

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

show more ...


# 7179edea 16-Aug-2023 Evan Bacon <[email protected]>

feat(cli): pull in metro improvements from #23963 (#23987)

# Why

- Add server tag to logging.
- Reduce server invocations.

# Test Plan

- Unit tests

# Checklist

<!--
Please check the

feat(cli): pull in metro improvements from #23963 (#23987)

# Why

- Add server tag to logging.
- Reduce server invocations.

# Test Plan

- Unit tests

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 8e209b4c 15-Aug-2023 Evan Bacon <[email protected]>

fix lint (#23960)

# Why

-
https://github.com/expo/expo/commit/73eead7f400d5a868fb42092a22feb54b10b9795
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, for

fix lint (#23960)

# Why

-
https://github.com/expo/expo/commit/73eead7f400d5a868fb42092a22feb54b10b9795
<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 87669a95 15-Aug-2023 Mark Lawlor <[email protected]>

feat(cli): add `expo typescript` command (#23642)

# Why

The command serves two purposes
- Allow users to manually start the Expo Typescript bootstrap process
- Generate Expo Router types wi

feat(cli): add `expo typescript` command (#23642)

# Why

The command serves two purposes
- Allow users to manually start the Expo Typescript bootstrap process
- Generate Expo Router types within CI environments.

Unlike the automatic Typescript detection, this command will bypass
prompts and simply enable Typescript support.

# How

Reuses `TypeScriptProjectPrerequisite` and the Typescript services from
`MetroBundlerDevServer`.

This PR also modifies the
`MetroBundlerDevServer.startTypeScriptServices()` to run without a
started server (so file watching will be disabled)

# Test Plan

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

show more ...


# 73eead7f 14-Aug-2023 Evan Bacon <[email protected]>

feat(cli): improved entry errors during metro static web rendering (#23909)

# Why

- Surface static rendering errors exactly to increase visibility.

---------

Co-authored-by: Expo Bot <34669

feat(cli): improved entry errors during metro static web rendering (#23909)

# Why

- Surface static rendering errors exactly to increase visibility.

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 8a424beb 11-Aug-2023 James Ide <[email protected]>

[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)

Why
---
Prettier 3 is out. Add support for it with this linter config.

**Note for reviewer:** the first commit is the one with th

[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)

Why
---
Prettier 3 is out. Add support for it with this linter config.

**Note for reviewer:** the first commit is the one with the actual
changes. The rest of this PR are changes to get the linter passing
(mostly autofix).

How
---
Update eslint-config-prettier and eslint-plugin-prettier. To address
deprecation warnings, also update typescript-eslint/parser and
typescript-eslint/eslint-plugin.
Because of an update to typescript-eslint/parser, we need to suppress
deprecation warnings (documented in a comment).

Regenerated test snapshots. Due to the upgraded dependencies, typecasts
and optional chaining are now auto-fixable by lint. This converts
warnings into autofixes.

Test Plan
---
`yarn test` in the linter config. Run `expotools check --all --fix-lint
--no-build --no-test --no-uniformity-check` to try this config on the
whole repo.

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 465d3694 26-Jul-2023 Evan Bacon <[email protected]>

feat(cli): dynamically enable lazy bundling (#23675)

# Why

If a package is using `import()` syntax, it needs to have
`@expo/metro-runtime` installed and imported somewhere. This issue
partially

feat(cli): dynamically enable lazy bundling (#23675)

# Why

If a package is using `import()` syntax, it needs to have
`@expo/metro-runtime` installed and imported somewhere. This issue
partially goes away in RN 73, and is not a problem in `expo-router`.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# cf472be6 12-Jul-2023 Evan Bacon <[email protected]>

fix(cli): Added improved error message for static metro when a package is missing (#23499)

Co-authored-by: Expo Bot <[email protected]>


# e24c47a6 28-Jun-2023 Evan Bacon <[email protected]>

fix(cli): Add fallback error for static rendering (#23170)

# Why

If you attempt to static render without Expo Router then things could go
wrong, this adds a fallback error message in development

fix(cli): Add fallback error for static rendering (#23170)

# Why

If you attempt to static render without Expo Router then things could go
wrong, this adds a fallback error message in development to try and make
things more clear.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# Test Plan

- In a project without Expo Router (`@expo/metro-runtime`), enable Metro
web and static output, then add an import error.

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 42637653 28-Jun-2023 Evan Bacon <[email protected]>

feat(cli): Add metro favicon middleware (#23072)

# Why

- Expo Webpack had support and this was a nice feature.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
is

feat(cli): Add metro favicon middleware (#23072)

# Why

- Expo Webpack had support and this was a nice feature.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

- Add middleware in development for `/favicon.ico` which generates a
favicon based on the config in `app.json` `web.favicon`

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

- Added tests. They're not fully exhaustive and don't cover the `single`
export case.


<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 94b54ec3 20-Jun-2023 Evan Bacon <[email protected]>

chore(cli, docs): update typed routes (#22848)

# Why

I keep getting DMs about this feature being confusing so I'm doing a
pass to try and bring it to parity with the rest of our offering.

<!-

chore(cli, docs): update typed routes (#22848)

# Why

I keep getting DMs about this feature being confusing so I'm doing a
pass to try and bring it to parity with the rest of our offering.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

- Update the experimental docs to not be a general "TypeScript" guide
but rather, be focused on the "Typed Routes" feature.
- Use the new `experiments.typedRoutes` flag and not an environment
variable. https://github.com/expo/universe/pull/12590
- Drop flag misinfo in the Expo CLI docs "This includes support for the
network inspector."
- Add a slightly more e2e test for the side-effects.
- Document how to actually turn the feature on.

---------

Co-authored-by: Aman Mittal <[email protected]>
Co-authored-by: Expo Bot <[email protected]>

show more ...


# 47d62600 16-Jun-2023 Kudo Chien <[email protected]>

[cli][packages] unify the default dev server port to 8081 (#22880)

# Why

for historical reasons, when running `npx expo start` the dev-server listens to port 19000, and running `npx expo start --

[cli][packages] unify the default dev server port to 8081 (#22880)

# Why

for historical reasons, when running `npx expo start` the dev-server listens to port 19000, and running `npx expo start --dev-client` it listens to port 8081. since we are now on our effort to deprecate `--dev-client` option, it is better to unify the listening port.
close ENG-8936

# How

- update packages/**/*.ts for port 19000 -> 8081
- search more occurrences for 19000 to 8081

# Test Plan

- ci passed
- bare-expo
- unversioned expo go + ncl

show more ...


# 2e1e108b 13-Jun-2023 Evan Bacon <[email protected]>

fix(cli): noop source maps for context modules (#22874)

# Why

- fix ENG-8900

---------

Co-authored-by: Expo Bot <[email protected]>


# 1a3d836e 22-May-2023 Evan Bacon <[email protected]>

feat(cli): Add `--no-minify` flag to `npx expo export` to prevent minifying output JavaScript. (#22544)

# Why

Nice feature to have for debugging.

# How

- Add the `--no-minify` flag to `npx

feat(cli): Add `--no-minify` flag to `npx expo export` to prevent minifying output JavaScript. (#22544)

# Why

Nice feature to have for debugging.

# How

- Add the `--no-minify` flag to `npx expo export`.
- Forward the flag to all Metro invocations.
- Also noticed that in some places, we were minifying Node.js code which
doesn't matter, so now we always skip minification when creating static
functions.

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

- `npx expo export --no-minify` -> JS and CSS is not minified.

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# fa47afa8 16-May-2023 Evan Bacon <[email protected]>

Import `fetch` from `node-fetch` to support older Node.js versions. (#22480)


# 8be9689f 08-May-2023 evanbacon <[email protected]>

Revert "feat(metro-config): add web sourcemap support (#22334)"

This reverts commit d8e77756248549b2932cdc8911688f7ef09fb177.


# d8e77756 08-May-2023 Evan Bacon <[email protected]>

feat(metro-config): add web sourcemap support (#22334)

# Why

- ensure exporting sourcemaps on web strips out the sourcemap tags when
sourcemaps aren't generated.
- ensure sourcemaps are relativ

feat(metro-config): add web sourcemap support (#22334)

# Why

- ensure exporting sourcemaps on web strips out the sourcemap tags when
sourcemaps aren't generated.
- ensure sourcemaps are relative on web in production when produced (may
revert).
- ensure web sources don't use `.bundle` in map URLs.
- ensure web source maps are placed in the new generated folder
`dist/_expo`.


<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 9580591f 30-Apr-2023 Evan Bacon <[email protected]>

feat(metro-config, cli): CSS serializer (#22325)

# Why

In order to support static CSS in development mode, we need to update
the metro serializer to support returning the JS and CSS assets. We n

feat(metro-config, cli): CSS serializer (#22325)

# Why

In order to support static CSS in development mode, we need to update
the metro serializer to support returning the JS and CSS assets. We now
inline the CSS in the HTML before sending to the client, this allows for
testing how the website works with JS disabled. We use the same style
tag id to continue to support HMR for styles during subsequent updates.

This change also refactors how exports work to serialize JS and CSS at
the same time (i.e. after the native transformations).

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


# 24228e75 13-Apr-2023 Evan Bacon <[email protected]>

feat(cli): use LogBox for static Metro errors (#22118)

# Why

Static rendering errors from Metro are hard to use. This PR (in
conjunction with https://github.com/expo/router/pull/491) makes it
p

feat(cli): use LogBox for static Metro errors (#22118)

# Why

Static rendering errors from Metro are hard to use. This PR (in
conjunction with https://github.com/expo/router/pull/491) makes it
possible to use LogBox for all Metro rendering errors.

# Test Plan

<img width="783" alt="Screenshot 2023-04-13 at 1 42 01 PM"
src="https://user-images.githubusercontent.com/9664363/231853560-77062191-47ea-43c4-8f2f-9f366b7e5418.png">
<img width="835" alt="Screenshot 2023-04-13 at 1 42 22 PM"
src="https://user-images.githubusercontent.com/9664363/231853562-48ae2dd7-8aea-46f5-b7d8-f4c222595b21.png">


<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).

---------

Co-authored-by: Expo Bot <[email protected]>

show more ...


12