Skip to content

Commit

Permalink
build: fix issue with desktop app packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril committed Jan 30, 2024
1 parent 1823db2 commit 52be500
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion scripts/build-front.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion webapp/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 52be500

Please sign in to comment.