diff --git a/docs/install/0-INSTALL.md b/docs/install/0-INSTALL.md index ccb86e9b63..388f98b5f7 100644 --- a/docs/install/0-INSTALL.md +++ b/docs/install/0-INSTALL.md @@ -44,6 +44,9 @@ Then perform the following steps: cd .. ``` + > IMPORTANT : make sur the generated files are in the `dist` (or `build`) folder. + > Using another folder may require substantial adaptations in the CI/CD pipelines. + 5. Run the application ```shell diff --git a/scripts/build-front.sh b/scripts/build-front.sh index fce9cb7e0a..37a1b2a41f 100755 --- a/scripts/build-front.sh +++ b/scripts/build-front.sh @@ -5,7 +5,11 @@ set -e CURR_DIR=$(cd "$(dirname "$0")" && pwd) cd "$CURR_DIR"/../webapp -npm run build + +# When the web application is running in Desktop mode, +# the web app is served at the `/static` entry point. +npm run build -- --base=/static/ + cd .. rm -fr resources/webapp cp -r ./webapp/dist/ resources/webapp diff --git a/webapp/src/i18n.ts b/webapp/src/i18n.ts index d467b9169f..d1d95a0574 100644 --- a/webapp/src/i18n.ts +++ b/webapp/src/i18n.ts @@ -18,7 +18,9 @@ export default function i18nInit(version = "unknown") { .init({ fallbackLng: "en", backend: { - loadPath: `/locales/{{lng}}/{{ns}}.json?v=${version}`, + loadPath: `${ + import.meta.env.BASE_URL + }locales/{{lng}}/{{ns}}.json?v=${version}`, }, react: { useSuspense: false,