Explorar el Código

feat: update umi version and remove some config

lanjianrong hace 4 años
padre
commit
f8924fa864
Se han modificado 4 ficheros con 666 adiciones y 1781 borrados
  1. 1 2
      config/config.ts
  2. 2 2
      package.json
  3. 1 4
      plugin.ts
  4. 662 1773
      pnpm-lock.yaml

+ 1 - 2
config/config.ts

@@ -38,7 +38,6 @@ export default defineConfig({
     baseNavigator: false
   },
   define: { REACT_APP_ENV: REACT_APP_ENV || false },
-  targets: { ie: 11 },
   routes,
   title: false,
   proxy: proxy[REACT_APP_ENV || 'dev'],
@@ -63,7 +62,7 @@ export default defineConfig({
       'antd'
     ]
   ],
-  externals: {
+  externals: REACT_APP_ENV !== 'dev' && {
     react: 'React',
     'react-dom': 'ReactDOM'
   },

+ 2 - 2
package.json

@@ -33,8 +33,8 @@
     "@ant-design/pro-layout": "6.38.17",
     "@ant-design/pro-table": "2.76.3",
     "@icon-park/react": "^1.3.3",
-    "@umijs/max": "4.0.9",
-    "@umijs/plugins": "4.0.9",
+    "@umijs/max": "4.0.11",
+    "@umijs/plugins": "4.0.11",
     "ahooks": "^3.4.1",
     "antd": "4.21.0",
     "antd-img-crop": "^3.16.0",

+ 1 - 4
plugin.ts

@@ -3,10 +3,7 @@ import { IApi } from '@umijs/max'
 export default (api: IApi) => {
   api.addHTMLHeadScripts(() => {
     return process.env.NODE_ENV === 'development'
-      ? [
-          'https://d2.smartcost.com.cn/cach/cld/react18.1.0/react.development.js',
-          'https://d2.smartcost.com.cn/cach/cld/react18.1.0/react-dom.development.js'
-        ]
+      ? []
       : [
           'https://d2.smartcost.com.cn/cach/cld/react18.1.0/react.production.min.js',
           'https://d2.smartcost.com.cn/cach/cld/react18.1.0/react-dom.production.min.js'

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 662 - 1773
pnpm-lock.yaml