mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-11 08:31:30 -04:00
feat(config): fallback baseUrl to /
This commit is contained in:
parent
78ab0c8186
commit
bd1dbcf9ea
1 changed files with 4 additions and 2 deletions
|
@ -16,6 +16,8 @@ import Icons from 'unplugin-icons/vite';
|
||||||
import IconsResolver from 'unplugin-icons/resolver';
|
import IconsResolver from 'unplugin-icons/resolver';
|
||||||
import VueI18n from '@intlify/unplugin-vue-i18n/vite';
|
import VueI18n from '@intlify/unplugin-vue-i18n/vite';
|
||||||
|
|
||||||
|
const baseUrl = process.env.BASE_URL ?? '/';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -55,7 +57,7 @@ export default defineConfig({
|
||||||
description: 'Aggregated set of useful tools for developers.',
|
description: 'Aggregated set of useful tools for developers.',
|
||||||
display: 'standalone',
|
display: 'standalone',
|
||||||
lang: 'fr-FR',
|
lang: 'fr-FR',
|
||||||
start_url: `${process.env.BASE_URL}/?utm_source=pwa&utm_medium=pwa`,
|
start_url: `${baseUrl}/?utm_source=pwa&utm_medium=pwa`,
|
||||||
orientation: 'any',
|
orientation: 'any',
|
||||||
theme_color: '#18a058',
|
theme_color: '#18a058',
|
||||||
background_color: '#f1f5f9',
|
background_color: '#f1f5f9',
|
||||||
|
@ -92,7 +94,7 @@ export default defineConfig({
|
||||||
}),
|
}),
|
||||||
Unocss(),
|
Unocss(),
|
||||||
],
|
],
|
||||||
base: process.env.BASE_URL,
|
base: baseUrl,
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue