Skip to content

Commit

Permalink
feat: Improve output code size and do not package tests
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The package now does use `Object.assign` directly instead of babel helpers. In older browsers you need to pollyfill `Object.assign` and `Symbol`. `react` itself has the same requirements, see https://reactjs.org/docs/javascript-environment-requirements.html
BREAKING CHANGE: Tests are not shipped anymore with the npm package.
  • Loading branch information
danez committed Apr 17, 2022
1 parent e1682a8 commit 77d571a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 22 additions & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,28 @@ const modules = output == null ? false : output;
const targets = env === 'test' ? { node: 'current' } : undefined;

const options = {
presets: [['@babel/env', { loose: true, modules, targets }], '@babel/react'],
assumptions: {
ignoreToPrimitiveHint: true,
iterableIsArray: true,
mutableTemplateObject: true,
noNewArrows: true,
objectRestNoSymbols: true,
setComputedProperties: true,
setSpreadProperties: true,
},
presets: [
[
'@babel/env',
{
loose: true,
modules,
targets,
corejs: '3',
useBuiltIns: 'entry',
},
],
['@babel/react', { useBuiltIns: true }],
],
plugins: [],
};

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"esm",
"lib",
"style",
"src"
"src/*.js",
"src/components/*.js",
"src/helpers/*.js"
],
"homepage": "https://github.com/reactjs/react-tabs",
"keywords": [
Expand Down

0 comments on commit 77d571a

Please sign in to comment.