-
Notifications
You must be signed in to change notification settings - Fork 18
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
gh-pages project route not matching #76
Comments
Haven't been able to test it yet, but I think setting a baseUrl in your
|
@brechtpm Just tried that, in the dev server it runs fine, but I still get the same error on gh-pages. |
This is similar in idea to
#74. Your path is
technically not `/` but `/project-name`. Something you can do is run
through all routes recursively (before passing them to the .router()
method) and prefixing them with the base pathname you're mounting your
application on. It'd be cool if someone could write a package for that.
Hope this makes sense!
…On Thu, Jan 19, 2017 at 3:12 PM Jesse Jurman ***@***.***> wrote:
@brechtpm <https://github.com/brechtpm> Just tried that, in the dev
server it runs fine, but I still get the same error on gh-pages.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#76 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWlemfQpyEGzfB_WDTPI0DfKcEr_YwVks5rT28ygaJpZM4Lnms6>
.
|
Apparently gh-pages doesn't support single-page apps out of the box. There are some extensive hacks out there to make it work though, so maybe you'd have some luck trying one of those. |
@yoshuawuyts that makes sense... I guess I could check what environment I'm building for, and prepend all the routes before sending it to sheet-router if I'm building for production. Currently, create-react-app looks for a @brechtpm that's an awesome find... It might be a little overkill for some of the projects I'm working on :P |
I'm building an app with choo, and my router looks like this:
This works great when running locally or doing development, but when I push this to github pages, the project lives in a route off my github,
http://jrjurman.github.io/project-name/
, and I get an error thatproject-name/
is not a matching route.I am able to use the default parameter to get a single route app working, but it doesn't solve the issue if there are multiple routes.
Is there a defined way to solve this?
The text was updated successfully, but these errors were encountered: