Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

[webpack-config] Implement public path #938

Merged
merged 7 commits into from
Aug 26, 2019

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Aug 15, 2019

Why

To make this work -> https://docs.expo.io/versions/latest/distribution/publishing-websites/#github-pages

How

Added the ability to publish to a publicPath based on the homepage field of the package.json.

Test Plan

  1. expo init
  2. Add URL
// package.json
+   "homepage": "http://evanbacon.github.io/gh-pages-expo-web-deployment-test",
  1. expo build:web && yarn gh-pages -d web-build

@EvanBacon EvanBacon added bug Something isn't working expo build This issue pertains to the command expo build labels Aug 15, 2019
@EvanBacon EvanBacon requested review from ide, fson and cruzach August 15, 2019 22:14
@EvanBacon EvanBacon self-assigned this Aug 15, 2019
@EvanBacon EvanBacon marked this pull request as ready for review August 16, 2019 00:33
@cruzach
Copy link
Contributor

cruzach commented Aug 16, 2019

Deploying to Github pages worked, but if you have homepage set in package.json there are issues with the other deployment methods (Now & Netlify)

Is it possible to still have the public path url work for all the methods, even if homepage is set for gh pages? Or should we just make it clear to not have that set if you're building for not gh pages

@EvanBacon
Copy link
Contributor Author

@cruzach setting process.env.WEB_PUBLIC_PATH="gh-pages-expo-web-deployment-test" should work for that. Could we work this into the docs somehow? Also we need to update the docs to reflect the correct build path:

- build
+ web-build

@cruzach
Copy link
Contributor

cruzach commented Aug 16, 2019

Yeah that worked, I'll update the docs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working expo build This issue pertains to the command expo build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants