Browse Source

chore: `window.process`定义在`index.html`中,防止低版本浏览器报错

i18n
xiaoxian521 2 years ago
parent
commit
9a448143ae
  1. 3
      index.html
  2. 2
      vite.config.ts

3
index.html

@ -10,6 +10,9 @@
/> />
<title>pure-admin-thin</title> <title>pure-admin-thin</title>
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<script>
window.process = {};
</script>
</head> </head>
<body> <body>

2
vite.config.ts

@ -70,8 +70,6 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
chunkSizeWarningLimit: 4000 chunkSizeWarningLimit: 4000
}, },
define: { define: {
"process.platform": null,
"process.version": null,
__INTLIFY_PROD_DEVTOOLS__: false, __INTLIFY_PROD_DEVTOOLS__: false,
__APP_INFO__: JSON.stringify(__APP_INFO__) __APP_INFO__: JSON.stringify(__APP_INFO__)
} }

Loading…
Cancel
Save