Skip to content

Conversation

cyrus28214
Copy link

Enable subpath deployment via BASE_URL for easier reverse proxy/subdirectory hosting. Close #198.

Changes:

  1. vite.config.ts: set base from BASE_URL
  2. Router: BrowserRouter basename={import.meta.env.BASE_URL}
  3. i18n: loadPath prefixed by BASE_URL
  4. Assets: background via imports; fonts imported in src/index.tsx

Usage:

export BASE_URL='/omni-tools/'
npm run dev
# or
npm run build
npm run serve

Help Needed:

  1. Can anyone help me check if PWA and Docker works well with BASE_URL?
  2. I am not sure if I've caught all the absolute paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BASE_URL Support
1 participant