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.

Don't assume the project is hosted at the root

See original GitHub issue

We currently have an assumption in publicPath in webpack.config.prod.js that the bundle is served from the root, but it may not be (e.g. with GH Pages, it’ll be at you.github.io/projectname/).

I don’t want to add configuration for this but it would be great if we could parse homepage from package.json and use it to determine the publicPath. We can then document it or add a prompt (or a notice) as part of the creation flow.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gaearoncommented, Jul 22, 2016

You can use my “todos” repo as good testbed. (Make sure to switch to branch with the biggest number.) Then play with opening /active or /completed and refreshing.

0reactions
meghprkhcommented, Jul 22, 2016

If this is done using any kind of config, it must be in such a way IMO that the publicPath should be accessible from the main code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How should I configure create-react-app to serve app from ...
I want to server admin panel from https://smyapp.example.com/admin/. I try to use create-react-app but it assumes that i serve SPA from root URL ......
Read more >
How to avoid $HOME being considered as project root by ...
Your $HOME is recognized as a project root Emacs will assume $HOME is the root of any project living under $HOME. If this...
Read more >
How To Set Up a React Project with Create React App
Starting a new JavaScript project with React used to be a complicated ... The project was built assuming it is hosted at the...
Read more >
Pitfalls and Common Mistakes | NGINX
Some directories in any file system should never be used for hosting data from. These include / and root . You should never...
Read more >
2. Project Management Overview
Projects exist to bring about a product or service that hasn't existed before. In this sense, a project is unique. Unique means that...
Read more >

github_iconTop Related Medium Post

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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found