Skip to content

BASE_URL support#248

Open
cyrus28214 wants to merge 2 commits intoiib0011:mainfrom
cyrus28214:dev/issue-198
Open

BASE_URL support#248
cyrus28214 wants to merge 2 commits intoiib0011:mainfrom
cyrus28214:dev/issue-198

Conversation

@cyrus28214
Copy link
Copy Markdown

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