From 54af194d926fd2d2e2d458ad36a6434ce44fd567 Mon Sep 17 00:00:00 2001
From: rmt/src <144435+rmtsrc@users.noreply.github.com>
Date: Sun, 18 Jun 2023 12:09:52 +0100
Subject: [PATCH] fix: allow hosting in subfolder via BASE_URL
---
index.html | 12 ++++++------
vite.config.ts | 3 ++-
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/index.html b/index.html
index 12a46b72..e8b8a60e 100644
--- a/index.html
+++ b/index.html
@@ -2,7 +2,7 @@
-
+
IT Tools - Handy online tools for developers
@@ -14,13 +14,13 @@
itemprop="description"
content="Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT."
/>
-
+
-
-
-
-
+
+
+
+
diff --git a/vite.config.ts b/vite.config.ts
index 38586764..f6b236ab 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -55,7 +55,7 @@ export default defineConfig({
description: 'Aggregated set of useful tools for developers.',
display: 'standalone',
lang: 'fr-FR',
- start_url: '/?utm_source=pwa&utm_medium=pwa',
+ start_url: `${process.env.BASE_URL}/?utm_source=pwa&utm_medium=pwa`,
orientation: 'any',
theme_color: '#18a058',
background_color: '#f1f5f9',
@@ -92,6 +92,7 @@ export default defineConfig({
}),
Unocss(),
],
+ base: process.env.BASE_URL,
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),