Bläddra i källkod

fix: process is not defined in path

xiaoxian521 2 år sedan
förälder
incheckning
1ed598c5f2
2 ändrade filer med 2 tillägg och 3 borttagningar
  1. 0 3
      index.html
  2. 2 0
      vite.config.ts

+ 0 - 3
index.html

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

+ 2 - 0
vite.config.ts

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