Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/demo-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
VITE_API_BASE_URL: "https://api.monorepo.prefabs.tech"
VITE_APP_TITLE: 'React Demo'
VITE_APP_VERSION: ${{ steps.package-version.outputs.current-version}}
VITE_APP_BASE_PATH=: '/react/'
VITE_APP_BUILD: 'develop'
VITE_APP_COPYRIGHT_HOLDER: 'Prefabs Tech'
VITE_APP_COPYRIGHT_HOLDER_URL: 'https://prefabs.tech'
Expand Down
1 change: 1 addition & 0 deletions apps/demo/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ VITE_APP_NAME=$npm_package_name
VITE_APP_PORT=20083
VITE_APP_TITLE="Prefabs Tech Demo App"
VITE_APP_VERSION=$npm_package_version
VITE_APP_BASE_PATH=

VITE_FEATURE_SHOW_VERSION=1
VITE_LOCAL_STORAGE_NAMESPACE="demo_app__"
2 changes: 1 addition & 1 deletion apps/demo/src/Routers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const router = createBrowserRouter(
},
],
{
basename: "/react/",
basename: import.meta.env.VITE_APP_BASE_PATH,
},
);

Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const config: AppConfig = {
localeSwitcher: {
showBadge: true,
},
logo: "/react/logo.png",
logo: `${(import.meta.env.VITE_APP_BASE_PATH || "").replace(/\/$/, "")}/logo.png`,
mainMenu: [
{
name: "header.menu.ui",
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig(({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };

return {
base: "/react/",
base: process.env.VITE_APP_BASE_PATH,
plugins: [
react(),
createHtmlPlugin({
Expand Down