Open jbojcic1 opened 5 years ago
Any news on this ? This could be nice
shameless self-promotion alert:
this feature is available in my @warren-bank/serve
fork of serve
option 1:
portal
subdirectory--single
option
serve
(upstream), this is completely broken/index.html
/index.html
{
"engine": "text",
"source": "statusCode:404",
"destination": "/portal/index.html",
"exact": true,
"terminal": true
}
option 2:
portal
subdirectory--single
option
/index.html
/portal
in requested pathnames:
{
"engine": "regex",
"source": "^/portal(/.*)$",
"destination": "$1",
"flags": "i",
"terminal": true
}
Sometimes you need to serve the SPA from non root directory. For example let's say that I have a react app and I need to serve it on /portal, in my index html I will have paths like
/portal/static/css/main.dce7bb36.chunk.css
Currently server is just returning index.html for those paths.