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.

Moving this here:

One blocking issue I’ve run into with the current Sapper is that I can’t rewrite urls from various sites that we want to host a “whitelabel” version of our app on, because the basepath has to be set in stone at build time:

https://example.com/some-path/ <-- does not work https://subdomain.example.com/ <-- works fine

rather than host a different app for people who want to mount it under a subpath, ideally basepath could be a runtime concern. However I don’t know if this is feasible, but it’s worth considering.

Cool. For me it is to support ipfs website both when served through an ENS domain or through a gateway with ipfs/ base path for example, both url point to the same exact content : https://ipfs.io/ipfs/bafybeieeuq3av6jdys2q2zwhfv5hutcqejczr46wzjikd5vulfaxfi72r4/ https://jolly-roger.eth.link/ for the hash version, I have to compute at runtime the basepath since it is not possible to know the hash of an ipfs website at build time

https://ptb.discord.com/channels/457912077277855764/750388563354583071/771786495152357386

paths.base is baked into the app at build time. Changing this would likely need to be done in Vite: https://github.com/vitejs/vite/issues/2009

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:20
  • Comments:40 (15 by maintainers)

github_iconTop GitHub Comments

11reactions
DanMacDonaldcommented, Oct 12, 2022

Quite disappointed to see this issue get moved to post-1.0 😔

7reactions
antonycommented, Mar 23, 2021

Yeah - this is super critical from my perspective, we have an ever growing range of people who use our main site with branding, and they hate subdomains because it’s arguably not as good for SEO. Sapper doesn’t support using a sub-path as the root without a totally separate build and deployment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create a dynamic basePath in Next.js config
I want to do three things in my application, but I'm not figuring out how I could do that using Next.js router.
Read more >
Dynamic base path for an Elm SPA - bigardone.dev
The <base> HTML element. First of all, I needed a way to prepend the dynamic base URL to any of the internal Elm...
Read more >
Base Path - next.config.js
js application under a sub-path of a domain you can use the basePath config option. basePath allows you to set a path prefix...
Read more >
Setup host and basePath dynamically - Google Groups
I have one site with SwaggerUi and three APIs from different environments. I did not specify host and base path because I need...
Read more >
API Host and Base Path - Swagger
The base URL is defined by schemes , host and basePath on the root level of the API ... host and schemes can...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found