Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 44407d6

Browse files
committed
Update babel config.
1 parent bca8b63 commit 44407d6

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

babel.config.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
module.exports = (api) => {
22
api.cache.using(() => process.env.NODE_ENV);
3-
const isDevelopment = api.env("development");
4-
const plugins = [];
5-
6-
if (isDevelopment) {
7-
plugins.concat("react-refresh/babel");
8-
}
93

104
return {
115
presets: [
126
"@babel/env",
13-
["@babel/preset-react", { runtime: "automatic" }],
7+
['@babel/preset-react', {development: !api.env('production'), runtime: 'automatic'}],
148
"@babel/preset-typescript",
15-
],
16-
plugins,
9+
]
1710
};
1811
};

0 commit comments

Comments
 (0)