question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

src paths for files are '/' and for a static site should be './' in build

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gaearoncommented, Jul 22, 2016

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.

0reactions
selfupcommented, Jul 28, 2016

Fantastic! Thanks for the update

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found