Skip to content

Commit

Permalink
feat(metro-config): enable unstable_allowRequireContext (#19257)
Browse files Browse the repository at this point in the history
* unstable_allowRequireContext

* fix build files

* Update CHANGELOG.md

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

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
  • Loading branch information
EvanBacon and expo-bot committed Sep 26, 2022
1 parent b015987 commit be9ba12
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/@expo/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### 🎉 New features

- Enable `require.context` by default. ([#19257](https://github.com/expo/expo/pull/19257) by [@EvanBacon](https://github.com/EvanBacon))
- Handle all development session errors. ([#18499](https://github.com/expo/expo/pull/18499) by [@EvanBacon](https://github.com/EvanBacon))
- Add `EXPO_NO_DEFAULT_PORT` to skip proxy port. ([#18464](https://github.com/expo/expo/pull/18464) by [@EvanBacon](https://github.com/
- Disable interactive prompts in non TTY processes. ([#18300](https://github.com/expo/expo/pull/18300) by [@EvanBacon](https://github.com/EvanBacon))
Expand Down
5 changes: 2 additions & 3 deletions packages/@expo/cli/ts-declarations/metro/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ declare module 'metro' {
optimizationSizeLimit: number;
publicPath: string;
allowOptionalDependencies: AllowOptionalDependencies;
unstable_allowRequireContext?: boolean;
}>;

//#endregion
Expand Down Expand Up @@ -393,9 +394,7 @@ declare module 'metro' {

getCreateModuleId(): (path: string) => number;

build(
options: BundleOptions
): Promise<{
build(options: BundleOptions): Promise<{
code: string;
map: string;
}>;
Expand Down
2 changes: 2 additions & 0 deletions packages/@expo/metro-config/build/ExpoMetroConfig.js

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

0 comments on commit be9ba12

Please sign in to comment.