Skip to content

Commit c94725d

Browse files
committed
Add extra export to work with react-native's bundler
1 parent 43f1190 commit c94725d

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "crdtmap",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"license": "MIT",
55
"main": "./dist/crdtmap.cjs",
66
"scripts": {

Diff for: rollup.config.js

+16
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,21 @@ export default [
1515
resolve({ browser: true }),
1616
commonjs()
1717
]
18+
},
19+
20+
// Add .js to work with react-native
21+
{
22+
input: 'src/index.js',
23+
output: {
24+
name: 'CrdtMap',
25+
file: 'dist/crdtmap.cjs.js',
26+
format: 'cjs',
27+
sourcemap: true,
28+
exports: 'default'
29+
},
30+
plugins: [
31+
resolve({ browser: true }),
32+
commonjs()
33+
]
1834
}
1935
]

0 commit comments

Comments
 (0)