Skip to content

Commit

Permalink
build: fix issue with desktop app packaging (#1912)
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril authored Jan 30, 2024
1 parent 1823db2 commit 60957a7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/install/0-INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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 60957a7

Please sign in to comment.