diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 09535d94b9..8e3962450e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,7 @@ on: branches: - "master" - "hotfix/**" + - "bugfix/desktop_build_windows" jobs: binary: diff --git a/scripts/build-front.sh b/scripts/build-front.sh index 37a1b2a41f..8f48625758 100755 --- a/scripts/build-front.sh +++ b/scripts/build-front.sh @@ -8,7 +8,7 @@ cd "$CURR_DIR"/../webapp # When the web application is running in Desktop mode, # the web app is served at the `/static` entry point. -npm run build -- --base=/static/ +npm run build -- --mode=desktop-app cd .. rm -fr resources/webapp diff --git a/webapp/vite.config.ts b/webapp/vite.config.ts index 1acfabe928..510122d961 100644 --- a/webapp/vite.config.ts +++ b/webapp/vite.config.ts @@ -4,15 +4,20 @@ import react from "@vitejs/plugin-react-swc"; const SERVER_URL = "http://localhost:8080"; // https://vitejs.dev/config/ -export default defineConfig({ - plugins: [react({ devTarget: "es2022" })], - server: { - port: 3000, - strictPort: true, - proxy: { - "/v1": SERVER_URL, - "/version": SERVER_URL, - "/ws": SERVER_URL, +export default defineConfig(({ mode }) => { + const isDesktopAppMode = mode === "desktop-app"; + + return { + base: isDesktopAppMode ? "/static/" : "/", + plugins: [react({ devTarget: "es2022" })], + server: { + port: 3000, + strictPort: true, + proxy: { + "/v1": SERVER_URL, + "/version": SERVER_URL, + "/ws": SERVER_URL, + }, }, - }, + }; });