use lib0 conditional exports in cjs file

This commit is contained in:
Kevin Jahns 2023-03-22 11:02:55 +01:00
parent d815855450
commit e73eb0bf92
3 changed files with 6 additions and 12 deletions

8
package-lock.json generated
View File

@ -9,7 +9,7 @@
"version": "13.5.50",
"license": "MIT",
"dependencies": {
"lib0": "^0.2.49"
"lib0": "^0.2.72"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.1",
@ -2481,9 +2481,9 @@
}
},
"node_modules/lib0": {
"version": "0.2.70",
"resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.70.tgz",
"integrity": "sha512-RpUODIS+AqQjoK4XrgMDZkox3S2pxzvnt5d0itCXCWd8NW7flboVAvvIbNUWR6XLTJz8I7FTPcNu1UFhvs0MsA==",
"version": "0.2.72",
"resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.72.tgz",
"integrity": "sha512-JPnUxl15tO6jrBASQ92+uDyQzW4ISMhDORq6mLovBYxESEWQCj5SnC8oYkELboGbU1ZqCIEEDwCL6mYqWNzdOA==",
"dependencies": {
"isomorphic.js": "^0.2.4"
},

View File

@ -75,7 +75,7 @@
},
"homepage": "https://docs.yjs.dev",
"dependencies": {
"lib0": "^0.2.49"
"lib0": "^0.2.72"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.1",

View File

@ -42,13 +42,7 @@ export default [{
name: 'Y',
file: 'dist/yjs.cjs',
format: 'cjs',
sourcemap: true,
paths: path => {
if (/^lib0\//.test(path)) {
return `lib0/dist/${path.slice(5)}.cjs`
}
return path
}
sourcemap: true
},
external: id => /^lib0\//.test(id)
}, {