|
@@ -1,16 +1,28 @@
|
|
|
// https://umijs.org/config/
|
|
|
-import { defineConfig } from 'umi';
|
|
|
+import { defineConfig } from 'umi'
|
|
|
import WebpackWindiCSSPlugin from 'windicss-webpack-plugin/dist/index'
|
|
|
export default defineConfig({
|
|
|
plugins: [
|
|
|
// https://github.com/zthxxx/react-dev-inspector
|
|
|
- 'react-dev-inspector/plugins/umi/react-inspector',
|
|
|
+ 'react-dev-inspector/plugins/umi/react-inspector'
|
|
|
],
|
|
|
// https://github.com/zthxxx/react-dev-inspector#inspector-loader-props
|
|
|
inspectorConfig: {
|
|
|
exclude: [],
|
|
|
- babelPlugins: ["@babel/plugin-proposal-logical-assignment-operators", "@babel/plugin-proposal-optional-chaining", "@babel/plugin-proposal-nullish-coalescing-operator"],
|
|
|
- babelOptions: {},
|
|
|
+ babelPlugins: [
|
|
|
+ '@babel/plugin-proposal-logical-assignment-operators',
|
|
|
+ '@babel/plugin-proposal-optional-chaining',
|
|
|
+ '@babel/plugin-proposal-nullish-coalescing-operator',
|
|
|
+ [
|
|
|
+ 'import',
|
|
|
+ {
|
|
|
+ libraryName: '@icon-park/react',
|
|
|
+ libraryDirectory: 'es/icons',
|
|
|
+ camel2DashComponentName: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ babelOptions: {}
|
|
|
},
|
|
|
chainWebpack(config) {
|
|
|
config.plugin('clearn').use(WebpackWindiCSSPlugin, [
|
|
@@ -24,5 +36,5 @@ export default defineConfig({
|
|
|
},
|
|
|
webpack5: {
|
|
|
// lazyCompilation: {},
|
|
|
- },
|
|
|
-});
|
|
|
+ }
|
|
|
+})
|