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

[experiments.baseUrl] External URL -> Duplicate folder structure #28649

Open
biller-aivy opened this issue May 7, 2024 · 6 comments
Open

[experiments.baseUrl] External URL -> Duplicate folder structure #28649

biller-aivy opened this issue May 7, 2024 · 6 comments
Assignees
Labels
Router expo-router

Comments

@biller-aivy
Copy link

biller-aivy commented May 7, 2024

Summary

The new metro web bundler has a bug:

When basePath is specified as an external URL, the assets are created in a subFolders.
As a result, when the script is executed on an external website, the external page searches for https://content.app/assets/... but the content is actually at https://content.app/contentapp/assets.... hosted.

What platform(s) does this occur on?

Web

SDK Version

50

Environment

expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.4.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, watchOS 10.2
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode: 15.1/15C65 - /usr/bin/xcodebuild
npmPackages:
expo: ~50.0.17 => 50.0.17
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.73.6 => 0.73.6
react-native-web: ~0.19.6 => 0.19.11
Expo Workflow: managed

Minimal reproducible example

Just create a example expo app and add

"experiments": {
      "baseUrl": "https://develop.some.app"
 }

@EvanBacon

@biller-aivy biller-aivy added CLI Versioned Expo CLI -- `npx expo start` needs validation Issue needs to be validated labels May 7, 2024
@expo-bot expo-bot removed the needs validation Issue needs to be validated label May 7, 2024
@marklawlor marklawlor added Router expo-router and removed CLI Versioned Expo CLI -- `npx expo start` labels May 8, 2024
@EvanBacon
Copy link
Contributor

It seems like you're attempting to use baseUrl as an asset prefix for hosting on a CDN, this is not how it's intended to be used. We'll need to introduce a second option for configuring external asset prefixes.

@biller-aivy
Copy link
Author

It seems like you're attempting to use baseUrl as an asset prefix for hosting on a CDN, this is not how it's intended to be used. We'll need to introduce a second option for configuring external asset prefixes.

Yes, we offer our partner to add our app on their own pages. As example, https://webapp.aivy.app so there you can see the current webpack build but with the links as src in the scripts to our s3 hosted script.

@kouloughli-hemza
Copy link

It seems like you're attempting to use baseUrl as an asset prefix for hosting on a CDN, this is not how it's intended to be used. We'll need to introduce a second option for configuring external asset prefixes.

Really need that functionality

@biller-aivy
Copy link
Author

@EvanBacon maybe you can give me some advice, than I could try to develop it my myself.

@kouloughli-hemza
Copy link

@biller-aivy do you have any success with that so far?

@biller-aivy
Copy link
Author

@biller-aivy do you have any success with that so far?

Nope.
Waiting for @EvanBacon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Router expo-router
Projects
None yet
Development

No branches or pull requests

5 participants