Skip to content

Commit c431f07

Browse files
committed
update Rollup config.
1 parent 710e680 commit c431f07

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

rollup.config.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
export default {
22
input: 'index.js',
33
output: [
4+
// ES
45
{
56
file: 'es/index.js',
6-
format: 'es'
7+
format: 'esm'
78
},
9+
// CommonJS
810
{
911
file: 'lib/index.js',
1012
format: 'cjs'
1113
},
14+
// UMD
1215
{
1316
file: 'dist/index.js',
1417
format: 'umd',
15-
name: 'useMediaQuery'
16-
}
17-
]
18+
name: 'useMediaQuery',
19+
globals: {
20+
react: 'React'
21+
}
22+
},
23+
],
24+
external: ['react']
1825
};

0 commit comments

Comments
 (0)