Serve: Add ability to serve SPA from non root

Created on 11 Sep 2019  路  2Comments  路  Source: vercel/serve

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.

All 2 comments

You should compile with PUBLIC_URL=/portal. That does the trick.

Any news on this ? This could be nice

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phelma picture phelma  路  5Comments

malinda1986 picture malinda1986  路  6Comments

nikitamendelbaum picture nikitamendelbaum  路  6Comments

Olexiy665 picture Olexiy665  路  3Comments

Simran-B picture Simran-B  路  4Comments