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 20
20
],
21
21
"ignore" : [
22
22
" node_modules/**"
23
+ ],
24
+ "plugins" : [
25
+ " @babel/plugin-transform-runtime"
23
26
]
24
27
}
Original file line number Diff line number Diff line change 49
49
"devDependencies" : {
50
50
"@babel/cli" : " ^7.10.1" ,
51
51
"@babel/core" : " ^7.10.2" ,
52
+ "@babel/plugin-transform-runtime" : " ^7.10.1" ,
52
53
"@babel/preset-env" : " ^7.10.2" ,
53
54
"@babel/preset-react" : " ^7.10.1" ,
54
55
"@commitlint/cli" : " ^9.0.1" ,
95
96
"react-test-renderer" : " ^16.13.1" ,
96
97
"rollup" : " ^2.13.1" ,
97
98
"rollup-plugin-filesize" : " ^9.0.0" ,
98
- "rollup-plugin-local-resolve" : " ^1.0.7" ,
99
- "rollup-plugin-peer-deps-external" : " ^2.2.2" ,
100
99
"rollup-plugin-postcss" : " ^3.1.2" ,
101
100
"sass" : " ^1.26.7" ,
102
101
"sass-loader" : " ^8.0.2" ,
114
113
"prop-types" : " ^15.7.2" ,
115
114
"react" : " ^16.12.0" ,
116
115
"react-dom" : " ^16.12.0"
116
+ },
117
+ "dependencies" : {
118
+ "@babel/runtime" : " ^7.10.2"
117
119
}
118
120
}
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import commonjs from '@rollup/plugin-commonjs';
4
4
import postcss from 'rollup-plugin-postcss' ;
5
5
import filesize from 'rollup-plugin-filesize' ;
6
6
import autoprefixer from 'autoprefixer' ;
7
- import localResolve from 'rollup-plugin-local-resolve' ;
8
7
9
8
import pkg from './package.json' ;
10
9
@@ -14,6 +13,7 @@ const OUTPUT_NAME = 'Example';
14
13
const GLOBALS = {
15
14
react : 'React' ,
16
15
'react-dom' : 'ReactDOM' ,
16
+ 'prop-types' : 'PropTypes' ,
17
17
} ;
18
18
19
19
const PLUGINS = [
@@ -24,11 +24,16 @@ const PLUGINS = [
24
24
] ,
25
25
} ) ,
26
26
babel ( {
27
+ babelHelpers : 'runtime' ,
27
28
exclude : 'node_modules/**' ,
28
29
} ) ,
29
- localResolve ( ) ,
30
30
resolve ( {
31
31
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
+ ] ,
32
37
} ) ,
33
38
commonjs ( ) ,
34
39
filesize ( ) ,
@@ -37,6 +42,7 @@ const PLUGINS = [
37
42
const EXTERNAL = [
38
43
'react' ,
39
44
'react-dom' ,
45
+ 'prop-types' ,
40
46
] ;
41
47
42
48
const OUTPUT_DATA = [
You can’t perform that action at this time.
0 commit comments