Przeglądaj źródła

feat: @arco-design/web-react按需加载

lanjianrong 4 lat temu
rodzic
commit
79f28bad09
1 zmienionych plików z 12 dodań i 1 usunięć
  1. 12 1
      config/config.js

+ 12 - 1
config/config.js

@@ -76,7 +76,18 @@ export default defineConfig({
         libraryName: '@icon-park/react',
         libraryDirectory: 'es/icons',
         camel2DashComponentName: false
-      }
+      },
+      '@icon-park/react'
+    ],
+    [
+      'import',
+      {
+        libraryName: '@arco-design/web-react',
+        libraryDirectory: 'es',
+        camel2DashComponentName: false,
+        style: true // 样式按需加载
+      },
+      '@arco-design/web-react'
     ]
   ],
   chainWebpack(config) {