File tree Expand file tree Collapse file tree 4 files changed +40
-31
lines changed
Expand file tree Collapse file tree 4 files changed +40
-31
lines changed Original file line number Diff line number Diff line change 2020 ],
2121 "ignore" : [
2222 " node_modules/**"
23+ ],
24+ "plugins" : [
25+ " @babel/plugin-transform-runtime"
2326 ]
2427}
Original file line number Diff line number Diff line change 4949 "devDependencies" : {
5050 "@babel/cli" : " ^7.10.1" ,
5151 "@babel/core" : " ^7.10.2" ,
52+ "@babel/plugin-transform-runtime" : " ^7.10.1" ,
5253 "@babel/preset-env" : " ^7.10.2" ,
5354 "@babel/preset-react" : " ^7.10.1" ,
5455 "@commitlint/cli" : " ^9.0.1" ,
9596 "react-test-renderer" : " ^16.13.1" ,
9697 "rollup" : " ^2.13.1" ,
9798 "rollup-plugin-filesize" : " ^9.0.0" ,
98- "rollup-plugin-local-resolve" : " ^1.0.7" ,
99- "rollup-plugin-peer-deps-external" : " ^2.2.2" ,
10099 "rollup-plugin-postcss" : " ^3.1.2" ,
101100 "sass" : " ^1.26.7" ,
102101 "sass-loader" : " ^8.0.2" ,
114113 "prop-types" : " ^15.7.2" ,
115114 "react" : " ^16.12.0" ,
116115 "react-dom" : " ^16.12.0"
116+ },
117+ "dependencies" : {
118+ "@babel/runtime" : " ^7.10.2"
117119 }
118120}
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import commonjs from '@rollup/plugin-commonjs';
44import postcss from 'rollup-plugin-postcss' ;
55import filesize from 'rollup-plugin-filesize' ;
66import autoprefixer from 'autoprefixer' ;
7- import localResolve from 'rollup-plugin-local-resolve' ;
87
98import pkg from './package.json' ;
109
@@ -14,6 +13,7 @@ const OUTPUT_NAME = 'Example';
1413const GLOBALS = {
1514 react : 'React' ,
1615 'react-dom' : 'ReactDOM' ,
16+ 'prop-types' : 'PropTypes' ,
1717} ;
1818
1919const PLUGINS = [
@@ -24,11 +24,16 @@ const PLUGINS = [
2424 ] ,
2525 } ) ,
2626 babel ( {
27+ babelHelpers : 'runtime' ,
2728 exclude : 'node_modules/**' ,
2829 } ) ,
29- localResolve ( ) ,
3030 resolve ( {
3131 browser : true ,
32+ resolveOnly : [
33+ / ^ (? ! r e a c t $ ) / ,
34+ / ^ (? ! r e a c t - d o m $ ) / ,
35+ / ^ (? ! p r o p - t y p e s ) / ,
36+ ] ,
3237 } ) ,
3338 commonjs ( ) ,
3439 filesize ( ) ,
@@ -37,6 +42,7 @@ const PLUGINS = [
3742const EXTERNAL = [
3843 'react' ,
3944 'react-dom' ,
45+ 'prop-types' ,
4046] ;
4147
4248const OUTPUT_DATA = [
You can’t perform that action at this time.
0 commit comments