Skip to content

Commit 10d8322

Browse files
committed
Chore: add UMD, CJS, system build to rollup config
- Update eslint config for resolving __DEV__
1 parent d412f84 commit 10d8322

9 files changed

+1050
-132
lines changed

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@
111111
"@typescript-eslint/parser": [".js", ".jsx", ".ts", ".tsx"]
112112
}
113113
},
114+
"globals": {
115+
"__DEV__": true
116+
},
114117
"overrides": [
115118
{
116119
"files": ["src"],

babel.config.js

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
11
module.exports = (api, targets) => {
22
// https://babeljs.io/docs/en/config-files#config-function-api
33
const isTestEnv = api.env("test");
4-
54
return {
65
babelrc: false,
76
ignore: ["./node_modules"],
87
presets: [
8+
"@babel/preset-react",
9+
"@babel/preset-typescript",
910
[
1011
"@babel/preset-env",
1112
{
1213
loose: true,
13-
modules: isTestEnv ? "commonjs" : `false`,
14+
modules: isTestEnv ? "commonjs" : false,
1415
targets: isTestEnv ? { node: "current" } : targets,
1516
},
1617
],
17-
"@babel/preset-typescript",
18-
"@babel/preset-react",
1918
],
2019
plugins: [
2120
["@babel/plugin-transform-react-jsx", { runtime: "automatic" }],
22-
"@babel/plugin-transform-typescript",
23-
"@babel/plugin-proposal-object-rest-spread",
24-
"@babel/plugin-proposal-optional-chaining",
25-
"@babel/plugin-proposal-nullish-coalescing-operator",
26-
"@babel/plugin-syntax-dynamic-import",
27-
"@babel/plugin-proposal-class-properties",
28-
"transform-react-remove-prop-types",
21+
["@babel/plugin-transform-typescript"],
2922
],
3023
};
3124
};

0 commit comments

Comments
 (0)