You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The devServer is really awesome and could be a game changer.
However it the client-side files are curretly refering to resources under the path "/_bun" which prevents us from serving the app on a sub-path.
What is the feature you are proposing to solve the problem?
Setting a baseUrl would allow serving the app behind a reverse-proxy on a sub-path. This is mostly used for servers like Kubernetes hosting multiple applications.
Having a baseUrl would also allow us to simply transform the absolute "/_bun" into "./_bun" that would fit our needs.
What alternatives have you considered?
I considered pre-building the clients assets and setting a static file server but is completelly defeats the ease-of-use of the current server philo.
The text was updated successfully, but these errors were encountered:
bun --hot --publicPath="http://localhost:3000/my-custom-path/" server/main.js
bun --hot --publicPath="/my-custom-path" server/main.js
I did not manage to have it work the expected way for 2 reasons:
the dev server still served the home page on / rather than on /my-custom-path
the assets requested by the web page in the browser were being requested at /_bun/...(.css,.js) rather than at /my-custom-path/_bun/...(.css,.js) (from the network tab in the web console)
Maybe it is working for the build and not the run command I currently use ?
note that it cannot be ./_bun as tempting as that is, because sometimes the internal state does not know exactly where it is being served. for example, the same HTML file placed on multiple routes, or a wildcard route. the HTML must specify an absolute path.
What is the problem this feature would solve?
The devServer is really awesome and could be a game changer.
However it the client-side files are curretly refering to resources under the path "/_bun" which prevents us from serving the app on a sub-path.
What is the feature you are proposing to solve the problem?
Setting a
baseUrl
would allow serving the app behind a reverse-proxy on a sub-path. This is mostly used for servers like Kubernetes hosting multiple applications.Having a
baseUrl
would also allow us to simply transform the absolute "/_bun" into "./_bun" that would fit our needs.What alternatives have you considered?
I considered pre-building the clients assets and setting a static file server but is completelly defeats the ease-of-use of the current server philo.
The text was updated successfully, but these errors were encountered: