Skip to content

Commit

Permalink
Fix PUBLIC_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
haishanh committed Jan 30, 2023
1 parent ec556ab commit a24a74e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit a24a74e

Please sign in to comment.