History log of /expo/packages/@expo/cli/src/export/fork-bundleAsync.ts (Results 1 – 20 of 20)
Revision Date Author Comments
# 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 ...


# 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 ...


# fd2402c1 24-Aug-2023 Evan Bacon <[email protected]>

feat(cli): add monorepo asset support for export:embed (#24095)

# Why

- Pull in support for using the forked getAssets which supports
`EXPO_USE_METRO_WORKSPACE_ROOT` from
https://github.com/exp

feat(cli): add monorepo asset support for export:embed (#24095)

# Why

- Pull in support for using the forked getAssets which supports
`EXPO_USE_METRO_WORKSPACE_ROOT` from
https://github.com/expo/expo/issues/24027

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

# How

- Drop unused `--generate-static-view-configs`
https://github.com/react-native-community/cli/pull/1970
- Update tests to use e2e fixture which has the expo package linked to
`packages`.
- Disable `watch` mode on metro when bundling for embed (we do this with
`npx expo export`).
- Use forked `getAssets` to support `EXPO_USE_METRO_WORKSPACE_ROOT`
correctly.
- Drop a bunch of unused option parsing.

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

# Test Plan

- E2E bundling 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]>

show more ...


# 1f98cdd7 22-Aug-2023 Evan Bacon <[email protected]>

fix imports lint (#24051)

# Why

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

# How

<!--
How did you build

fix imports lint (#24051)

# Why

<!--
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 ...


# 557aaacd 21-Aug-2023 Evan Bacon <[email protected]>

feat(font): add static optimization for fonts in expo router (#24027)

# Why

Extract fonts loaded with expo-font when using Expo Router on with
server rendering on web. This ensures that fonts ar

feat(font): add static optimization for fonts in expo router (#24027)

# Why

Extract fonts loaded with expo-font when using Expo Router on with
server rendering on web. This ensures that fonts are available before
the JavaScript loads, leading to much better UI during the initial
render.

Consider the following snippet:

```js
import FontAwesome from "@expo/vector-icons/FontAwesome";
import * as Font from "expo-font";
import { Text } from "react-native";

export default function Layout() {
// These fonts will be statically extracted on web and added to the initial HTML.
const [loaded, error] = Font.useFonts({
...FontAwesome.font,
Inter_400Regular: require("@/assets/fonts/Inter_400Regular.ttf"),
Inter_500Medium: require("@/assets/fonts/Inter_500Medium.ttf"),
});


if (loaded) {
// This code-path will never be used in static rendering now.
return null;
}

// This font is now styled before the JavaScript loads.
return (
<Text style={{ fontFamily: 'Inter_400Regular' }}>Hey</Text>
);
}
```

> Native can continue to be written defensively, web will adapt to the
API.



https://github.com/expo/expo/assets/9664363/e03de783-bcee-49d3-9bca-15bfc87966d5


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

# How

- When `loadAsync` or `useFonts` is used during static rendering, the
font will be added to a shared server context, which is then pulled in
`expo-router` and added to the static HTML. This doesn't work if the
call is outside the React tree, or if the font is loaded asynchronously,
or if the font is loaded in a `useEffect`.
- Updated docs to reflect new system.

# Test Plan

- E2E bundling test.
- Ensure that `useFonts` doesn't return `false` on the first render,
this prevents returning `null` and rendering nothing actionable.
- Ensure fonts are linked and preloaded according to the routes that
load them, including nesting.
- Node unit test to reduce the chance of breaking the more fragile parts
of the API.
- Published in a test app:
[before](https://64e0e449c07fa060ba0ce443--pillarvalley.netlify.app/settings/)
[after](https://64e0fb6251f1396c0b3eb62f--pillarvalley.netlify.app/settings/).
Notice that disabling JavaScript doesn't break font loading.

<!--
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 ...


# da5824c9 12-Jun-2023 Kudo Chien <[email protected]>

[cli] fix typecheck from react-native 0.72 upgrade (#22766)

# Why

follow up #22588 which disabled the cli typecheck

# How

using types from metro and fix typing issues

# Test Plan

cli

[cli] fix typecheck from react-native 0.72 upgrade (#22766)

# Why

follow up #22588 which disabled the cli typecheck

# How

using types from metro and fix typing issues

# Test Plan

cli ci passed

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 ...


# 9b2597ba 06-Apr-2023 Evan Bacon <[email protected]>

feat(metro-config, cli): CSS support for Metro web (#21941)

# Why

This PR moves the CSS support from Expo Router over to
`expo/metro-config` behind a beta flag. This is because we need deeper
i

feat(metro-config, cli): CSS support for Metro web (#21941)

# Why

This PR moves the CSS support from Expo Router over to
`expo/metro-config` behind a beta flag. This is because we need deeper
integration with Expo CLI and Metro in order to emit static CSS files in
production bundles. CSS is required for media queries -> rehydration.

- Related: https://github.com/expo/router/pull/397
https://github.com/expo/router/pull/223

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

# How

Instead of a babel transformer, we now use a custom "transformer" which
gives us the ability to add extra metadata to a Metro module on export.
This means we can pass the raw and processed CSS for writing to disk.

The development version of CSS still uses script injection via
JavaScript, meaning static rendering cannot currently be tested in
development.

CSS Modules are implemented (web-only currently) using lightningcss. The
export is generated to work with React Native for web. Consider the
following block:

```js
export default { ...StyleSheet.create({ container: { $$css: true, _: 'hashed-container-id' } }) }
```

CSS Variables are not currently hashed, enabling the user to define
variables in a global CSS file and access them in CSS Modules (subject
to change in order to support native). CSS variables are accessible from
the default export as strings: `styles['--color'] === '--color'`.


## Docs

I've chosen to document in the versioned metro doc instead of the
unversioned guide, this seems like a reasonable spot given the highly
experimental nature of this feature.


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

# Test Plan

- Unit tests for conversion.
- [x] Test in/out for transformer.
- [ ] Test static export.
- TBD for E2E


<!--
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).

show more ...


# 036e9444 28-Mar-2023 Evan Bacon <[email protected]>

feat(metro-config): support any entry file in development builds that don't use Expo dev client (#21643)

# Why

- React Native enforces that apps must use `index.js` as the entry file,
this is hi

feat(metro-config): support any entry file in development builds that don't use Expo dev client (#21643)

# Why

- React Native enforces that apps must use `index.js` as the entry file,
this is highly inconvenient and forces us to change the app entry on
`expo prebuild` (cite: [prebuild side
effects](https://github.com/expo/expo/blob/4d2795e/docs/pages/workflow/prebuild.mdx#side-effects)
(`index.js` and `package.json` `scripts`)).
- In #14964 I added support for production Android apps to use any entry
point.
- In #18381 I added the same support to iOS apps in production.
- Development builds using `expo-dev-client` and Expo Go both use a
manifest which support arbitrary entry points.
- This just leaves development builds that don't have Expo code-loading
support (e.g. no manifest/index.html where the script can be changed
dynamically).

# How

- This PR introduces the virtual entry file `.expo/.virtual-metro-entry`
which should never physically exist. When this endpoint is pinged, Expo
CLI will rewrite the the URL to the correct entry point based on the
project configuration. This enables us to fully drop the prebuild
side-effect as no case will require an `index.js` (`index.bundle`) as
the entry file.
- The rewrite means Metro will never support a physical file located at
`.expo/.virtual-metro-entry.js` as this will always be ignored. We could
support forwarding the request if this file exists but we'll probably go
the other way and assert if this file exists to mitigate possible
confusion.
- The name `.expo/.virtual-metro-entry.js` was chosen to be clear and
long enough that users wouldn't try to actually create this file.
- I originally tried using a middleware to perform the redirect but this
wouldn't work with the HMR server which emulates pinging the endpoint
in-memory. Because of this, I went with the metro
`server.rewriteRequestUrl` function.

> This feature is implemented in Expo's Metro configuration, meaning it
should apply to `npx react-native start` (but this is untested and not
officially supported).

## New Setup Instructions for non-prebuild users

Non-prebuild projects will need to modify their `AppDelegate.mm` as
follows:

```diff
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@".expo/.virtual-metro-entry"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
```

And their `android/app/src/main/java/***/MainApplication.java`:

```diff
@Override
protected String getJSMainModuleName() {
- return "index";
+ return ".expo/.virtual-metro-entry";
}
```

This is of course in addition to the `android/app/build.gradle`:

```groovy
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim())
```

And iOS production change:

```
shellScript = "if [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n# The project root by default is one level up from the ios directory\nexport PROJECT_ROOT=\"$PROJECT_DIR\"/..\n\nif [[ \"$CONFIGURATION\" = *Debug* ]]; then\n export SKIP_BUNDLING=1\nfi\nif [[ -z \"$ENTRY_FILE\" ]]; then\n # Set the entry JS file using the bundler's entry resolution.\n export ENTRY_FILE=\"$(\"$NODE_BINARY\" -e \"require('expo/scripts/resolveAppEntry')\" $PROJECT_ROOT ios relative | tail -n 1)\"\nfi\n\n`\"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/react-native-xcode.sh'\"`\n\n";
```

# Test Plan

### Continuous(-ish)

- Updated the templates to use this new format.

### Quick test

- Start the dev server and ping the entry URL directly:
-
`http://localhost:8081/.expo/.virtual-metro-entry.bundle?platform=web&dev=true&minify=false&modulesOnly=true&runModule=false&shallow=true`
- The redirected URL should show in the `sourceURL` at the end of the
file.

### E2E

- Prebuild, then apply the native changes in a local projects
- Use the following `metro.config.js` (you don't need to use the latest
Expo CLI for this to work):

```js
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require("../../expo/packages/@expo/metro-config");
// const { getDefaultConfig } = require('expo/metro-config');

module.exports = getDefaultConfig(__dirname);
```
- `npx expo run:ios` and `npx expo run:android` should point to
`index.bundle`
- Changing the `main` field in the package.json or deleting `index.js`
should continue to work when you reload the app.


# 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 ...


# b6b91c50 06-Mar-2023 Evan Bacon <[email protected]>

feat(cli)!: use Expo CLI to bundle production apps (#21396)

# Why

Most of our new Metro bundler features won't work unless we use Expo CLI
for every bundler operation (ex:
[aliases](https://git

feat(cli)!: use Expo CLI to bundle production apps (#21396)

# Why

Most of our new Metro bundler features won't work unless we use Expo CLI
for every bundler operation (ex:
[aliases](https://github.com/expo/expo/pull/21262)). Right now this is
the case when building for production on both platforms or building for
development on iOS.

> Using `npx expo start` when building from Xcode will be added in
another PR.

# How

This PR introduces a new "export:embed" command which is hidden from the
`--help` prompt. `npx expo export:embed` accepts the same arguments as
`npx react-native bundle` and passes them to the same internal function,
but it ensures we use the correct variation of Metro before doing such.

This change (and `start` PR) will add more steps for migrating to "Expo
CLI" but it will also remove the need for us to generate the
`metro.config.js` file in the project on `npx expo prebuild` since we
can now reliably default to `@expo/metro-config`.

The change should only apply to Metro bundler features (all application
code could be affected), but it won't obstruct Expo Modules Core or
using Expo CLI.

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

# Test Plan

- All of our existing E2E tests should use the new command, if they
contain features like aliases then they'll work.
- Copied the changes from `@expo/cli` into a new project's node_modules,
added template changes:
- Built for production from Android Studio and Xcode.

<!--
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]>
Co-authored-by: James Ide <[email protected]>

show more ...


# d42dd5d4 09-Feb-2023 Cedric van Putten <[email protected]>

feature(cli): add experimental metro config telemetry (#20885)

# Why

We need to have visibility on what experimental features are being used,
in order to prioritize supporting or finishing these

feature(cli): add experimental metro config telemetry (#20885)

# Why

We need to have visibility on what experimental features are being used,
in order to prioritize supporting or finishing these features.

# How

Added a telemetry event when instantiating Metro, for both `npx expo
start` and `npx expo export`.

# Test Plan

See added test, if a property isn't available, it doesn't matter.

# 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 ...


# 62f156c1 01-Feb-2023 Kudo Chien <[email protected]>

[cli][dev-server] fix hermes export sourcemap error (#21022)

# Why

react-native 0.71 (metro 0.73) has some changes which makes our `npx expo export` or `expo-cli publish` breaks when composing he

[cli][dev-server] fix hermes export sourcemap error (#21022)

# Why

react-native 0.71 (metro 0.73) has some changes which makes our `npx expo export` or `expo-cli publish` breaks when composing hermes source map.

```
Error: Invalid mapping: {"generated":{"line":1,"column":254},"source":"/Users/kudo/expo/expo/node_modules/metro-runtime/src/polyfills/require.js","original":{"line":0,"column":0},"name":null}
```

# How

- for hermes, we should [turn off minification](https://github.com/facebook/react-native/blob/86852f8cb5049f94d60e8a5423daccf0fb23cf84/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt#L67)
- also fix an issue that we don't enable `-O` (optimization) for hermes compiler.

# Test Plan

on `home` to run `npx expo export`

show more ...


# e330c216 27-Oct-2022 Evan Bacon <[email protected]>

fix(cli): skip printing source maps when exporting (#19710)

* fix(cli): skip printing source maps when exporting without writing source maps

* fix format for single-line items

* Update package

fix(cli): skip printing source maps when exporting (#19710)

* fix(cli): skip printing source maps when exporting without writing source maps

* fix format for single-line items

* Update packages/@expo/cli/CHANGELOG.md

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

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

show more ...


# ca84f1cd 14-Oct-2022 Evan Bacon <[email protected]>

feat(cli): Make Expo Metro config for web resolve projects using same `package.json` main fields as Expo Webpack (#19529)

* fix: ensure web is setup every time

* fix(cli): use correct main fields

feat(cli): Make Expo Metro config for web resolve projects using same `package.json` main fields as Expo Webpack (#19529)

* fix: ensure web is setup every time

* fix(cli): use correct main fields for Metro web

* Update packages/@expo/cli/CHANGELOG.md

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

* Update docs/pages/workflow/expo-cli.mdx

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

* Update docs/pages/workflow/expo-cli.mdx

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

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

show more ...


# c6fb96a7 10-Aug-2022 Evan Bacon <[email protected]>

feat(cli): add web support check to metro web in `expo start`. (#18428)

* feat(cli): add web support check to metro web in `expo start`.

* Update packages/@expo/cli/CHANGELOG.md

Co-authored-by

feat(cli): add web support check to metro web in `expo start`. (#18428)

* feat(cli): add web support check to metro web in `expo start`.

* Update packages/@expo/cli/CHANGELOG.md

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

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

show more ...


# aef260d6 15-Jul-2022 Evan Bacon <[email protected]>

chore: migrate metro-config, dev-server (#18221)

* chore: migrate metro CLI packages

* fix deps

* fix types

* Update withMetroMultiPlatform.ts

* Update yarn.lock


# 37d1352b 28-Jun-2022 Evan Bacon <[email protected]>

feat(cli): add multi-platform bundle logging during export (#17992)

* feat(cli): add multi-platform bundle logging during export

* Update fork-bundleAsync.ts

* Update packages/@expo/cli/CHANGE

feat(cli): add multi-platform bundle logging during export (#17992)

* feat(cli): add multi-platform bundle logging during export

* Update fork-bundleAsync.ts

* Update packages/@expo/cli/CHANGELOG.md

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

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

show more ...


# 6d6b81f9 23-Jun-2022 Evan Bacon <[email protected]>

feat(cli): add web support to metro (#17927)

* feat: add web support for metro

* undo patch

* Update index.js

* Update MetroBundlerDevServer.ts

* Add second bundler dev server

* Add d

feat(cli): add web support to metro (#17927)

* feat: add web support for metro

* undo patch

* Update index.js

* Update MetroBundlerDevServer.ts

* Add second bundler dev server

* Add dev loading view to web

* Put feature behind EXPO_USE_METRO_WEB flag

* Move custom config into CLI

* Add support for assets across platforms

* reduce

* Added upstream web support

* Update webTemplate.ts

* Update CHANGELOG.md

* Update instantiateMetro.ts

* Update instantiateMetro.ts

* Update index.js

* Added bundle splitting support

* Update startAsync.ts

* Fixed default settings

* Add ability to copy from public folder

* wip: redirect unmatched routes to `/` on web

* fix fallback api

* Update exportApp.ts

* Update instantiateMetro.ts

* Update exportApp.ts

* clean up handler

* fixup

* clean up

* add web to export test

* Update start-test.ts

* added static serving for web

* Update packages/@expo/cli/CHANGELOG.md

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

* Update yarn.lock

lint fix

fix tests

* Update export-test.ts

* added template tests

* Create HistoryFallbackMiddleware-test.ts

* test ManifestMiddleware

* Create ServeStaticMiddleware-test.ts

* refactor multiplatform

* Update ManifestMiddleware-test.ts

* Update withMetroMultiPlatform.ts

* Update for latest metro

* Update packages/@expo/cli/src/export/resolveOptions.ts

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

show more ...


# dc51e206 27-Apr-2022 Evan Bacon <[email protected]>

feat(cli): add `export` command (#17034)

* feat(cli): add export command

* Update CHANGELOG.md

* update tests

* Update packages/@expo/cli/CHANGELOG.md

Co-authored-by: Expo Bot <34669131+

feat(cli): add `export` command (#17034)

* feat(cli): add export command

* Update CHANGELOG.md

* update tests

* Update packages/@expo/cli/CHANGELOG.md

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

* reduce interface

* refactor

refactor

refactor

* refactor

* remove all merging code

* drop aliases

* Added asset saving tests

* refactor export code up

* Update env.ts

* Drop unused

* added e2e tests

* Dropped --quiet flag

* PR Feedback

* fix tests

* fix export tests

* Update export-test.ts

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

show more ...