Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit 2f3ab49

Browse files
author
Evans
authored
Merge pull request #1911 from remaxjs/fix/react-devtool
fix: 关闭 react-devtool 默认集成
2 parents 5636b85 + 8e741d8 commit 2f3ab49

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import errorScreen from '@remax/plugin-error-screen';
2-
import devtools from '@remax/plugin-devtools';
2+
// import devtools from '@remax/plugin-devtools';
33
import type { Options, Plugin } from '@remax/types';
44

55
export const builtinPlugins = (
@@ -8,18 +8,18 @@ export const builtinPlugins = (
88
optionKey: string;
99
init: (...args: any[]) => Plugin;
1010
}> => {
11-
const isDev = process.env.NODE_ENV !== 'production';
11+
// const isDev = process.env.NODE_ENV !== 'production';
1212
const plugins = [
1313
{
1414
optionKey: 'errorScreen',
1515
init: errorScreen,
1616
},
1717
];
18-
if (options.target !== 'web' && isDev && options.devtools) {
19-
plugins.push({
20-
optionKey: 'devtools',
21-
init: devtools,
22-
});
23-
}
18+
// if (options.target !== 'web' && isDev && options.devtools) {
19+
// plugins.push({
20+
// optionKey: 'devtools',
21+
// init: devtools,
22+
// });
23+
// }
2424
return plugins;
2525
};

packages/remax-cli/src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ export default class RemaxCLI {
7171
type: 'boolean',
7272
default: false,
7373
})
74-
.option('devtools', {
75-
describe: '启动 react-devtools 调试',
76-
alias: 'd',
77-
type: 'boolean',
78-
default: true,
79-
})
74+
// .option('devtools', {
75+
// describe: '启动 react-devtools 调试',
76+
// alias: 'd',
77+
// type: 'boolean',
78+
// default: true,
79+
// })
8080
.option('loglevel', {
8181
describe: '展示日志级别',
8282
type: 'string',

0 commit comments

Comments
 (0)