Skip to content

Commit

Permalink
feat: process.env使用define声明
Browse files Browse the repository at this point in the history
  • Loading branch information
wei-zone committed Jul 15, 2023
1 parent d826a9e commit 1cf9ae2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ export default (configEnv: ConfigEnv) => {
VitePluginMetaEnv(metaEnv, 'import.meta.env'),
VitePluginMetaEnv(metaEnv, 'process.env')
],
define: {
'process.env': JSON.stringify(metaEnv)
},
// 别名
resolve: {
alias: {
Expand Down

0 comments on commit 1cf9ae2

Please sign in to comment.