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.

[Feature]: Add `basename` to remix config file

See original GitHub issue

What is the new or updated feature that you are suggesting?

Somebody in discord asked if he could set a basename for a Remix app, so all routes would have that basename prepended to them: https://discord.com/channels/770287896669978684/770287896669978687/914576247068188692. I think this is something we could add to the remix.config.js file.

Why should this feature be included?

This would allow more flexibility in configuring a Remix app, giving more power to the developer a la “you own your stack.”

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:9

github_iconTop GitHub Comments

1reaction
meehawkcommented, Dec 5, 2021

@zachdtaylor I have started it. I wasn’t sure if you’re going to work on it. I’m really sorry 🥲

0reactions
kilimancommented, Mar 18, 2022

It’s mentioned in the README

Depending on your setup, you may also need to update publicPath and assetsBuildDirectory to include your basePath. This will ensure that your assets will be served properly.

module.exports = {
  ignoredRouteFiles: ['.*'],
  publicPath: `${basePath}/build/`,
  assetsBuildDirectory: `public${basePath}/build`,
  ...
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

[Feature]: Add basename to remix config file #2891 - GitHub
Add a baseName/basePath/pathPrefix to the remix config. This would automatically affect the routes, links and assets. What I've tried. My experience with remix...
Read more >
Route File Naming - Remix
Setting up routes in Remix is as simple as creating files in your app ... The filename maps to the route's URL pathname,...
Read more >
Router Provider - Refine Dev
React Router V6; React Router V5; React Location; Next.js Router; Remix Router ... Since Nextjs and Remix has a file system based router...
Read more >
Link - React Router: Declarative Routing for React.js
A function to which current location is passed as an argument and which should ... the current entry in the history stack instead...
Read more >
Command Line - SVGR
Depending you usage, you can install @svgr/cli locally in your project: ... Command line options have precedence over config file options.
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