Browse Source

refactor: update plugin config

lanjianrong 2 years ago
parent
commit
8cee89f00d
1 changed files with 9 additions and 4 deletions
  1. 9 4
      plugin.ts

+ 9 - 4
plugin.ts

@@ -3,13 +3,18 @@ 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'
         ]
   })
+  api.modifyHTML($ => {
+    $('meta[name=viewport]').remove()
+    return $
+  })
+  api.modifyHTML($ => {
+    $('html').attr('translate', 'no')
+    return $
+  })
 }