diff --git a/.gitpod.yml b/.gitpod.yml index 96ca4c0c8a8..79e288b9d0c 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -27,7 +27,7 @@ tasks: export HOME_LOCATION=$(gp url 8000) export API_LOCATION=$(gp url 3000) export CYPRESS_BASE_URL=$(gp url 8000) - export REACT_APP_CHALLENGE_EDITOR_API_LOCATION=$(gp url 3200) + export CHALLENGE_EDITOR_API_LOCATION=$(gp url 3200) export CHALLENGE_EDITOR_CLIENT_LOCATION=$(gp url 3300) ' >> ~/.bashrc; exit; diff --git a/tools/challenge-editor/client/sample.env b/tools/challenge-editor/client/sample.env index cd612fcad50..21383b79214 100644 --- a/tools/challenge-editor/client/sample.env +++ b/tools/challenge-editor/client/sample.env @@ -1 +1 @@ -VITE_CHALLENGE_EDITOR_API_LOCATION=http://localhost:3200 +CHALLENGE_EDITOR_API_LOCATION=http://localhost:3200 diff --git a/tools/challenge-editor/client/src/utils/handle-request.ts b/tools/challenge-editor/client/src/utils/handle-request.ts index 31140f45026..f00e97e397b 100644 --- a/tools/challenge-editor/client/src/utils/handle-request.ts +++ b/tools/challenge-editor/client/src/utils/handle-request.ts @@ -6,4 +6,4 @@ export const handleRequest = (makeRequest: () => Promise) => () => { }; export const API_LOCATION = import.meta.env - .VITE_CHALLENGE_EDITOR_API_LOCATION as string; + .CHALLENGE_EDITOR_API_LOCATION as string; diff --git a/tools/challenge-editor/client/vite.config.ts b/tools/challenge-editor/client/vite.config.ts index 9ca0d5611ea..a28154f931d 100644 --- a/tools/challenge-editor/client/vite.config.ts +++ b/tools/challenge-editor/client/vite.config.ts @@ -5,6 +5,7 @@ import react from '@vitejs/plugin-react'; export default defineConfig({ base: '/', plugins: [react()], + envPrefix: 'CHALLENGE_EDITOR_', server: { port: 3300 }