fix: allow hosting in subfolder via BASE_URL

This commit is contained in:
rmt/src 2023-06-18 12:09:52 +01:00
parent 4cbd7ac145
commit 54af194d92
No known key found for this signature in database
GPG key ID: 6DD597637A8B880A
2 changed files with 8 additions and 7 deletions

View file

@ -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)),