Skip to content
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

chore: rename basePath to baseUrl #25305

Merged
merged 23 commits into from Nov 10, 2023
Merged

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Nov 9, 2023

Why

TypeScript and Vite use baseUrl which I like more than basePath because it reflects that an absolute URL can be used.
Additionally, I want to use an inlined environment variable instead of Expo config to ensure the behavior between platforms is uniform and expected.
Finally, we pass baseUrl down to the transformer now which means the caching will automatically be invalidated when it changes.

I'm also setting us up to expose more transform settings as EXPO_ environment variables. e.g. EXPO_OS (or EXPO_PLATFORM) as a way to detect the platform without importing react-native / react-native-web.

Test Plan

  • basePath had good test coverage, running some things locally just to be safe.

Checklist

EvanBacon and others added 3 commits November 9, 2023 17:55
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Nov 10, 2023
Copy link
Member

@ide ide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes

docs/pages/versions/unversioned/config/metro.mdx Outdated Show resolved Hide resolved
packages/babel-preset-expo/src/common.ts Outdated Show resolved Hide resolved
Co-authored-by: Aman Mittal <amandeepmittal@live.com>
Co-authored-by: James Ide <ide@users.noreply.github.com>
@EvanBacon EvanBacon merged commit f191795 into main Nov 10, 2023
14 checks passed
@EvanBacon EvanBacon deleted the @evanbacon/rename-basePath-to-baseUrl branch November 10, 2023 20:35
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 2024
# Why

TypeScript and Vite use
[baseUrl](https://vitejs.dev/guide/build.html#public-base-path) which I
like more than `basePath` because it reflects that an absolute URL can
be used.
Additionally, I want to use an inlined environment variable instead of
Expo config to ensure the behavior between platforms is uniform and
expected.
Finally, we pass baseUrl down to the transformer now which means the
caching will automatically be invalidated when it changes.

I'm also setting us up to expose more transform settings as `EXPO_`
environment variables. e.g. `EXPO_OS` (or `EXPO_PLATFORM`) as a way to
detect the platform without importing `react-native` /
`react-native-web`.

# Test Plan

- basePath had good test coverage, running some things locally just to
be safe.

# 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 <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: Aman Mittal <amandeepmittal@live.com>
Co-authored-by: James Ide <ide@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants