Skip to content

Commit

Permalink
perf: 去掉modifyBabelPresetOpts配置
Browse files Browse the repository at this point in the history
  • Loading branch information
chemdemo committed Sep 27, 2021
1 parent 69d3fbc commit 8bc05b8
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,6 @@ export default (api: IApi) => {

// 只针对dev开启
if (api.env === 'development' && options) {
api.modifyBabelPresetOpts((opts) => {
return {
...opts,
react: {
...opts.react,
runtime: 'automatic',
development: true,
importSource: '@welldone-software/why-did-you-render',
},
};
});

api.addHTMLHeadScripts(() => [
{
content: `window.__WDYR__ = ${JSON.stringify(options)};`,
Expand Down

1 comment on commit 8bc05b8

@GilbertSun
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个还是要保留吧,automatic 模式下没有这个配置好像无法按预期执行

Please sign in to comment.