Support serving from virtual directory
I have an application that has to be mounted from a virtual directory with a given name. Today I solve this by manually creating that directory after build, and moving all build artifacts into it (example: make dir blog, and move build/* into it, then serve from .). It would be great if I could configure serve to serve a folder from localhost:8080/virtual/path.
In need of exactly this! I have a homepage path set in my package.json and serving my CRA build locally requires me to manually create the folder structure 🤕
I found that the following works:
"rewrites": [
{
"source": "virtual/path/static/:gen/:type/:name",
"destination": "/static/:gen/:type/:name"
}
]
However, I have to put a bunch of rewrites to handle all cases, so it's a bit brittle. I could not get the following rewrite to work: virtual/path/static/:path* => /static/:path.