src paths for files are '/' and for a static site should be './' in build
See original GitHub issueCurrently 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?
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How to quickly set up a build process for a static site
Open the dist folder in the root of your project to find the generated files and check out index.html to make sure your...
Read more >How to manage static files (e.g. images, JavaScript, CSS)
Configuring static files In your templates, use the static template tag to build the URL for the given relative path using the configured...
Read more >Dealing with files - Learn web development | MDN
File paths · Copy the image you chose earlier into your images folder. · Open up your index. · The line <img src=""...
Read more >Static files in ASP.NET Core
Learn how to serve and secure static files and configure static file hosting middleware behaviors in an ASP.NET Core web app.
Read more >Relative Path for static files like images/css/js etc
If you use WebPack, it takes care of the paths during the build. The <img src="..."> needs to point to the physical location...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the problem with
./
is it doesn’t work for single page apps with routing. For example when you loadlocalhost:3000/products
, you don’t want to loadproducts/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.
Fantastic! Thanks for the update