From a24a74e9e12aaa4fcff3e1e875e9e48bbe8ae245 Mon Sep 17 00:00:00 2001 From: Haishan Date: Mon, 30 Jan 2023 22:19:18 +0800 Subject: [PATCH] Fix PUBLIC_URL --- vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 439021f..be821f7 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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: {