Change web base to './'

This commit is contained in:
Haishan 2021-06-07 21:02:28 +08:00
parent 7234386150
commit c56f61e056
2 changed files with 2 additions and 1 deletions

View file

@ -7,7 +7,6 @@
"dev": "vite",
"start": "vite",
"build": "vite build",
"postbuild": "cp assets/* public",
"serve": "vite preview",
"pretty": "prettier --single-quote --write 'src/**/*.{js,scss,ts,tsx,md}'"
},

View file

@ -11,6 +11,7 @@ export default defineConfig(({ mode }) => ({
'process.env.NODE_ENV': JSON.stringify(mode),
'process.env.PUBLIC_URL': JSON.stringify('./'),
},
base: './',
publicDir: 'assets',
build: {
// the default value is 'dist'
@ -25,6 +26,7 @@ export default defineConfig(({ mode }) => ({
outDir: 'public',
filename: 'sw.ts',
strategies: 'injectManifest',
base: './',
}),
],
resolve: {