string
/
>= 1.0.10
server.base
is used to configure the base path of the server.
By default, the base path of the server is /
, and users can access index.html
through http://localhost:3000.
If you want to access index.html
through http://localhost:3000/foo/
, you can change server.base
to /foo
.
By default, dev.assetPrefix and output.assetPrefix will read the value of server.base
as the default value.
When server.base
is /foo
, the default resource URL loaded in the browser is as follows:
Then, index.html
and static assets can be accessed through http://localhost:3000/foo/
.
If you do not want to use this default behavior, you can override it by explicitly setting dev.assetPrefix
/ output.assetPrefix
: