running-tools

A collection of tools for runners and their coaches
git clone https://git.ashermorgan.net/running-tools/
Log | Files | Refs | README

commit b8f70f45e47374d94277dd3827238db68ca944b8
parent ced74a96ccfda720a91a232ee914bae47a188856
Author: ashermorgan <59518073+ashermorgan@users.noreply.github.com>
Date:   Tue, 21 Nov 2023 11:15:47 -0800

Implement BASE_URL environment variable

Diffstat:
Mscripts/deploy.sh | 2+-
Mvite.config.js | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/deploy.sh b/scripts/deploy.sh @@ -5,7 +5,7 @@ # abort on errors set -e -npm run build +BASE_URL=/running-tools/ npm run build cd dist diff --git a/vite.config.js b/vite.config.js @@ -47,7 +47,7 @@ export default defineConfig({ '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, - base: process.env.NODE_ENV === 'production' ? '/running-tools/' : '/', + base: process.env.BASE_URL ? process.env.BASE_URL : '/', test: { environment: 'jsdom', },