Browse Source
- 在正式编译为页面后, react-dev-inspector 一般就没有意义了,不应该在正式编译是开启,推荐只在本地开发时使用 - 不在 build 时开启还能优化减少 build 耗时 - inspector 插件本身需要配合前端组件 `<Inspector>` 使用,而原本组件的代码中也只在 dev 下才开启 rel:pull/7886/head818926f9862c94
committed by
GitHub
3 changed files with 22 additions and 14 deletions
@ -0,0 +1,15 @@ |
|||
// https://umijs.org/config/
|
|||
import { defineConfig } from 'umi'; |
|||
|
|||
export default defineConfig({ |
|||
plugins: [ |
|||
// https://github.com/zthxxx/react-dev-inspector
|
|||
'react-dev-inspector/plugins/umi/react-inspector', |
|||
], |
|||
// https://github.com/zthxxx/react-dev-inspector#inspector-loader-props
|
|||
inspectorConfig: { |
|||
exclude: [], |
|||
babelPlugins: [], |
|||
babelOptions: {}, |
|||
}, |
|||
}); |
|||
Loading…
Reference in new issue