Demonstrates
vite
's base URL configuration
https://stackoverflow.com/q/68380194/6277151
This project uses ./
as the base URL in production mode (when built), and /
in development mode.
-
Install dependencies:
yarn
-
Build the app:
yarn build
-
Open
dist/index.html
, and verify that the URLs are prefixed with./
instead of/
. -
Serve the app in production mode:
yarn serve
-
Browse to the app, inspect the Vue logo on the home page, and verify that the URL is prefixed with
./
instead of/
. -
Serve the app in development mode:
yarn dev
-
Browse to the app, inspect the Vue logo on the home page, and verify that the URL is prefixed with
/
instead of./
.