From 831629c33656dc1fe0fd01ee2cd250c3764fa732 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Wed, 25 Oct 2023 16:52:01 +0200 Subject: [PATCH 1/9] Start moving application to vite --- .env.TEMPLATE | 6 +- .env.production | 2 +- .env.test | 4 +- public/index.html => index.html | 19 +- package.json | 31 +- .../Exercises/Detail/Head/index.tsx | 27 +- src/env.d.ts | 12 + src/i18n.ts | 4 +- src/tests/setup.ts | 10 + src/utils/consts.ts | 6 +- src/utils/url.ts | 10 +- tsconfig.json | 5 + tsconfig.node.json | 14 + vite.config.ts | 17 + yarn.lock | 8133 +++-------------- 15 files changed, 1357 insertions(+), 6943 deletions(-) rename public/index.html => index.html (74%) create mode 100644 src/env.d.ts create mode 100644 src/tests/setup.ts create mode 100644 tsconfig.node.json create mode 100644 vite.config.ts diff --git a/.env.TEMPLATE b/.env.TEMPLATE index 89fa715e..4759cf07 100644 --- a/.env.TEMPLATE +++ b/.env.TEMPLATE @@ -5,7 +5,9 @@ # # wger instance -REACT_APP_API_SERVER=https://wger.de +VITE_API_SERVER=https://wger.de # API token for the user -REACT_APP_API_KEY=your-api-token-here \ No newline at end of file +VITE_API_KEY=your-api-token-here + +VITE_TIME_ZONE=Europe/Berlin \ No newline at end of file diff --git a/.env.production b/.env.production index 1cbd3e8b..7ca5b4d3 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,6 @@ # During production the wger instance is the same server from which the scripts # are executed. -REACT_APP_API_SERVER= +VITE_API_SERVER= # Don't generate source maps for production GENERATE_SOURCEMAP=false \ No newline at end of file diff --git a/.env.test b/.env.test index 2bf98c3d..965e687d 100644 --- a/.env.test +++ b/.env.test @@ -1,5 +1,5 @@ # wger instance -REACT_APP_API_SERVER=https://example.com +VITE_API_SERVER=https://example.com # API token for the user -REACT_APP_API_KEY=122333444455555666666 +VITE_API_KEY=122333444455555666666 diff --git a/public/index.html b/index.html similarity index 74% rename from public/index.html rename to index.html index 39cfbb6e..29acd9f2 100644 --- a/public/index.html +++ b/index.html @@ -2,34 +2,34 @@ - - - + + + - + - +