Fix PUBLIC_URL

This commit is contained in:
Haishan 2023-01-30 22:19:18 +08:00
parent ec556ab25c
commit a24a74e9e1

View file

@ -14,13 +14,14 @@ export default defineConfig(async ({ mode }) => {
} catch (e) { }
}
if (!hash) hash = '';
console.log('commit hash', hash);
return {
define: {
__VERSION__: JSON.stringify(pkg.version),
__COMMIT_HASH__: JSON.stringify(hash),
'process.env.NODE_ENV': JSON.stringify(mode),
'process.env.PUBLIC_URL': JSON.stringify('./'),
'process.env.PUBLIC_URL': JSON.stringify(''),
},
base: './',
resolve: {