Skip to content

Commit 0a450bb

Browse files
committed
Fix UMD build
1 parent 96be233 commit 0a450bb

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.size-snapshot.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"dist/react-input-mask.js": {
3-
"bundled": 38979,
4-
"minified": 14100,
5-
"gzipped": 4920
3+
"bundled": 37946,
4+
"minified": 13841,
5+
"gzipped": 4857
66
},
77
"lib/react-input-mask.development.js": {
88
"bundled": 33751,

rollup.config.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,16 @@ export default [
4646
file: 'dist/react-input-mask.js',
4747
format: 'umd',
4848
name: 'ReactInputMask',
49-
globals: { react: 'React' }
49+
globals: { 'react': 'React', 'react-dom': 'ReactDOM' }
5050
},
5151
external,
52-
plugins: [...plugins, sizeSnapshot()]
52+
plugins: [
53+
...plugins,
54+
replace({
55+
'process.env.NODE_ENV': '"development"'
56+
}),
57+
sizeSnapshot()
58+
]
5359
},
5460

5561
{
@@ -58,7 +64,7 @@ export default [
5864
file: 'dist/react-input-mask.min.js',
5965
format: 'umd',
6066
name: 'ReactInputMask',
61-
globals: { react: 'React' }
67+
globals: { 'react': 'React', 'react-dom': 'ReactDOM' }
6268
},
6369
external,
6470
plugins: minifiedPlugins

0 commit comments

Comments
 (0)