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

It doesn't work with gatsby build --prefix-paths #13

Closed
isi-gach opened this issue Oct 22, 2019 · 4 comments
Closed

It doesn't work with gatsby build --prefix-paths #13

isi-gach opened this issue Oct 22, 2019 · 4 comments
Labels

Comments

@isi-gach
Copy link

isi-gach commented Oct 22, 2019

I have created an example repo to reproduce the issue:
https://github.com/isi-gach/gastby-static/tree/create-react-app

When I do npm run build:gatsby and I go to http://localhost:5000/demo/index.html
the browser URL changes

If I create a create-react-app build instead using npm run build and I go to http://localhost:5000/demo/index.html the URL doesn't change as expected.

@blessanm86
Copy link

Try the fork from @xavivars. It has a couple of big fixes

@wardpeet
Copy link
Owner

Hey it does but you're pathPrefix is wrong in gatsby-config.js. The pathprefix needs to be the path where gatsby lives.

    "build:gatsby": "cross-env PUBLIC_URL=/web gatsby build --prefix-paths",

Please close when this solves your issue.

@isi-gach
Copy link
Author

Hi @wardpeet

I have upgraded plugin and made some changes in the sample repo to make more clear the issue
https://github.com/isi-gach/gastby-static

I have also created a video with the white page bug:
https://www.youtube.com/watch?v=0P_W3hnuTdw

I'm trying to serve the page from the following URL:
http://localhost:5000/public/index.html

It's good that now thanks to your plugin the URL don't change automatically to http://localhost:5000/public/ but the page content flashes and a white page is displayed instead.

@isi-gach
Copy link
Author

The issue is solved 0.2.0, thank you @wardpeet

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

No branches or pull requests

3 participants