-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(runtime): use
experiments.baseUrl
for web exports instead …
…of workaround
- Loading branch information
Showing
5 changed files
with
31 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.expo/ | ||
web-build/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const { version: expoVersion } = require('expo/package.json'); | ||
const { major } = require('semver'); | ||
|
||
/** | ||
* @param {object} params | ||
* @param {import('expo/config').ExpoConfig} params.config | ||
* @returns {import('expo/config').ExpoConfig} | ||
*/ | ||
module.exports = ({ config }) => { | ||
// Set web export prefix major Expo SDK version. | ||
// This is used to properly host the web build on Snack's S3 hosting. | ||
config.experiments ||= {}; | ||
config.experiments.baseUrl = `/v2/${major(expoVersion)}`; | ||
|
||
return config; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters