-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
src paths for files are '/' and for a static site should be './' in build #95
Comments
I think the problem with Since most React apps are single page apps (and most SPAs use HTML5 history over hashes these days), I think we we’ll have to stick with requiring a server for the bundle. But maybe I’m wrong. |
@vjeux Thanks for the response! Yea so currently if I am in a gh-pages branch and run: fs.readdirSync("./").forEach(toBeErased => {
if (toBeErased === "react-gh.js" || toBeErased === "build" || toBeErased === ".git" || toBeErased === "node_modules" | toBeErased === "src") {
} else {
fs.unlinkSync(toBeErased)
}
})
fs.readdirSync('build').forEach(file => {
fileContents = fs.readFileSync(`build/${file}`)
fs.writeFileSync(file, fileContents)
}) Everything looks fine, but the html is clueless haha. I got it to work perfectly after manually changing the paths :) |
@gaearon Never thought about the routing part. Good catch |
Sorry, deleted my response. #21 is also talking about the same issue |
@vjeux Is that just for the package.json or does that include the src for the script and link tags? |
Ok it seems this is being covered in multiple Issues. I couldn't tell from the titles! Feel free to keep open or close |
Let’s continue in #21. |
GH Pages should work with 0.2.0 alpha, here's how to test it: #190 |
Fantastic! Thanks for the update |
Currently the src paths are not friendly for a static site. They only work for using a server.
Is there any plan to make this work with a simple:
open index.html
?Or is this project only intended for people running this on a server?
The text was updated successfully, but these errors were encountered: