我在很多开源项目中看到用 __DEV__
变量来判断是否是开发环境,但是全局搜索也没找到该变量是在哪里定义的。
react-router项目:https://github.com/ReactTraining/react-router/blob/v6.0.0-beta.0/packages/react-router/index.tsx
history项目:https://github.com/ReactTraining/history/blob/master/packages/history/index.ts