diff --git a/Makefile b/Makefile index 51a08865..6ed9d630 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,7 @@ install-deps: $(STUFFBIN) # Build the frontend for production (both apps). .PHONY: frontend-build -frontend-build: install-deps - @echo "→ Building frontend for production - main app & widget..." - @export VITE_APP_VERSION="${VERSION}" && cd ${FRONTEND_DIR} && pnpm build:main - @export VITE_APP_VERSION="${VERSION}" && cd ${FRONTEND_DIR} && pnpm build:widget +frontend-build: frontend-build-main frontend-build-widget # Build only the main frontend app. .PHONY: frontend-build-main @@ -81,13 +78,14 @@ run-frontend-widget: .PHONY: build-backend build-backend: $(STUFFBIN) @echo "→ Building backend..." - @CGO_ENABLED=0 go build -a \ + @CGO_ENABLED=0 go build \ -ldflags="-X 'main.buildString=${BUILDSTR}' -X 'main.versionString=${VERSION}' -X 'github.com/abhinavxd/libredesk/internal/version.Version=${VERSION}' -s -w" \ -o ${BIN} cmd/*.go # Main build target: builds both frontend and backend, then stuffs static assets into the binary. .PHONY: build -build: frontend-build build-backend stuff +build: frontend-build build-backend + @$(MAKE) --no-print-directory stuff @echo "→ Build successful. Current version: $(VERSION)" # Stuff static assets into the binary using stuffbin. diff --git a/frontend/apps/main/index.html b/frontend/apps/main/index.html index 63340480..1ce7e812 100644 --- a/frontend/apps/main/index.html +++ b/frontend/apps/main/index.html @@ -9,7 +9,7 @@ - +
diff --git a/frontend/apps/main/src/router/index.js b/frontend/apps/main/src/router/index.js index 7ea886b3..e6f16410 100644 --- a/frontend/apps/main/src/router/index.js +++ b/frontend/apps/main/src/router/index.js @@ -1,17 +1,12 @@ import { createRouter, createWebHistory } from 'vue-router' -import App from '@main/App.vue' -import OuterApp from '@main/OuterApp.vue' -import InboxLayout from '@main/layouts/inbox/InboxLayout.vue' -import AccountLayout from '@main/layouts/account/AccountLayout.vue' -import AdminLayout from '@main/layouts/admin/AdminLayout.vue' -import { useAppSettingsStore } from '../stores/appSettings' -import { getI18n } from '../i18n' -import { abortRouteScope } from '../api' +import { useAppSettingsStore } from '@main/stores/appSettings' +import { getI18n } from '@main/i18n' +import { abortRouteScope } from '@main/api' const routes = [ { path: '/', - component: OuterApp, + component: () => import('@main/OuterApp.vue'), children: [ { path: '', @@ -35,7 +30,7 @@ const routes = [ }, { path: '/', - component: App, + component: () => import('@main/App.vue'), children: [ { path: 'contacts', @@ -66,7 +61,7 @@ const routes = [ path: '/inboxes/teams/:teamID', name: 'teams', props: true, - component: InboxLayout, + component: () => import('@main/layouts/inbox/InboxLayout.vue'), meta: { titleKey: 'globals.terms.teamInbox', hidePageHeader: true }, children: [ { @@ -90,7 +85,7 @@ const routes = [ path: '/inboxes/views/:viewID', name: 'views', props: true, - component: InboxLayout, + component: () => import('@main/layouts/inbox/InboxLayout.vue'), meta: { titleKey: 'globals.terms.view', hidePageHeader: true }, children: [ { @@ -120,7 +115,7 @@ const routes = [ path: '/inboxes/:type(assigned|unassigned|all|mentioned)?', name: 'inboxes', redirect: '/inboxes/assigned', - component: InboxLayout, + component: () => import('@main/layouts/inbox/InboxLayout.vue'), props: true, meta: { titleKey: 'globals.terms.inbox', hidePageHeader: true }, children: [ @@ -164,7 +159,7 @@ const routes = [ path: '/account/:page?', name: 'account', redirect: '/account/profile', - component: AccountLayout, + component: () => import('@main/layouts/account/AccountLayout.vue'), props: true, meta: { titleKey: 'globals.terms.account' }, children: [ @@ -186,7 +181,7 @@ const routes = [ { path: '/admin', name: 'admin', - component: AdminLayout, + component: () => import('@main/layouts/admin/AdminLayout.vue'), meta: { titleKey: 'globals.terms.admin' }, children: [ { diff --git a/frontend/apps/widget/index.html b/frontend/apps/widget/index.html index 66ac7efe..61b57d1b 100644 --- a/frontend/apps/widget/index.html +++ b/frontend/apps/widget/index.html @@ -7,7 +7,7 @@