Comments (9)
I think the problem with ./
is it doesn’t work for single page apps with routing.
For example when you load localhost:3000/products
, you don’t want to load products/main.js
.
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.
from create-react-app.
@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 :)
from create-react-app.
@gaearon Never thought about the routing part. Good catch
from create-react-app.
Sorry, deleted my response. #21 is also talking about the same issue
from create-react-app.
@vjeux Is that just for the package.json or does that include the src for the script and link tags?
from create-react-app.
Ok it seems this is being covered in multiple Issues. I couldn't tell from the titles!
Feel free to keep open or close
from create-react-app.
Let’s continue in #21.
from create-react-app.
GH Pages should work with 0.2.0 alpha, here's how to test it: #190
from create-react-app.
Fantastic! Thanks for the update
from create-react-app.
Related Issues (20)
- Snyk Package Analysis - Regular Expression Denial of Service (ReDoS) Vulnerability HOT 1
- Snyk Package Analysis - Improper Input Validation Vulnerability HOT 1
- Snyk Package Analysis - Prototype Pollution Vulnerability HOT 1
- Snyk Package Analysis - Missing Release of Resource after Effective Lifetime Vulnerability HOT 2
- Docs: code splitting links to old/incorrect React page
- Create issue Facebook app HOT 3
- Uncaught ReferenceError: process is not defined at emitReadable (_stream_readable.js:529:1) at onEofChunk (_stream_readable.js:506:1) at readableAddChunk (_stream_readable.js:255:1) at Readable.push (_stream_readable.js:241:1) at index.js:423:1 emitReadable @ _stream_readable.js:529 onEofChunk @ _stream_readable.js:506 readableAddChunk @ _stream_readable.js:255 Readable.push @ _stream_readable.js:241 (anonymous) @ index.js:423 Show 5 more frames Show less
- Run `npm install` in `D:\git\r\`. HOT 1
- Hi gaearon
- Hebosho911
- Could the community save this dead project? HOT 4
- pateknuk
- use parameter decorator HOT 5
- My React app not installing HOT 3
- create-react-app problem
- Can't start creat react app HOT 1
- Facing an error to install firebase HOT 1
- It is intentionally verbose. Otherwise there is a risk of accidentally exposing a private key on the machine that happens to have the same name.
- npx create-react-app HOT 2
- Dependency Packages introduced vulnerabilities associated with react-scripts 5.0.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-react-app.