Skip to content

Commit 18e8a0a

Browse files
committed
fix babel transpiling lib
1 parent 2c345c4 commit 18e8a0a

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"ignore": ["node-modules/**"],
3-
"presets": [ ['env', { modules: false }], "react"],
3+
"presets": [ "env", "react"],
44
"plugins": [ ["transform-object-rest-spread", { "useBuiltIns": true }], "transform-object-assign"]
55
}

rollup.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ const globals = {
1717
};
1818
const external = Object.keys(globals);
1919
const babelOptions = (production) => {
20-
let result = {
21-
plugins: ['external-helpers'],
22-
};
20+
let result = {
21+
babelrc: false,
22+
presets: [['env', { modules: false }], 'react'],
23+
plugins: [["transform-object-rest-spread", { "useBuiltIns": true }], 'transform-object-rest-spread', 'external-helpers'],
24+
};
2325
if (production) {
2426
result.plugins.push('transform-react-remove-prop-types');
2527
};

0 commit comments

Comments
 (0)