Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
],
"ignore": [
"node_modules/**"
],
"plugins": [
"@babel/plugin-transform-runtime"
]
}
52 changes: 25 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"devDependencies": {
"@babel/cli": "^7.10.1",
"@babel/core": "^7.10.2",
"@babel/plugin-transform-runtime": "^7.10.1",
"@babel/preset-env": "^7.10.2",
"@babel/preset-react": "^7.10.1",
"@commitlint/cli": "^9.0.1",
Expand Down Expand Up @@ -94,8 +95,6 @@
"react-test-renderer": "^16.13.1",
"rollup": "^2.13.1",
"rollup-plugin-filesize": "^9.0.0",
"rollup-plugin-local-resolve": "^1.0.7",
"rollup-plugin-peer-deps-external": "^2.2.2",
"rollup-plugin-postcss": "^3.1.2",
"sass": "^1.26.7",
"sass-loader": "^8.0.2",
Expand All @@ -113,5 +112,8 @@
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0"
},
"dependencies": {
"@babel/runtime": "^7.10.2"
}
}
10 changes: 8 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import commonjs from '@rollup/plugin-commonjs';
import postcss from 'rollup-plugin-postcss';
import filesize from 'rollup-plugin-filesize';
import autoprefixer from 'autoprefixer';
import localResolve from 'rollup-plugin-local-resolve';

import pkg from './package.json';

Expand All @@ -14,6 +13,7 @@ const OUTPUT_NAME = 'Example';
const GLOBALS = {
react: 'React',
'react-dom': 'ReactDOM',
'prop-types': 'PropTypes',
};

const PLUGINS = [
Expand All @@ -24,11 +24,16 @@ const PLUGINS = [
],
}),
babel({
babelHelpers: 'runtime',
exclude: 'node_modules/**',
}),
localResolve(),
resolve({
browser: true,
resolveOnly: [
/^(?!react$)/,
/^(?!react-dom$)/,
/^(?!prop-types)/,
],
}),
commonjs(),
filesize(),
Expand All @@ -37,6 +42,7 @@ const PLUGINS = [
const EXTERNAL = [
'react',
'react-dom',
'prop-types',
];

const OUTPUT_DATA = [
Expand Down