Skip to content

Commit 8b03617

Browse files
committed
update rollup and use different approach for #2
1 parent 95b0ce0 commit 8b03617

File tree

4 files changed

+319
-8
lines changed

4 files changed

+319
-8
lines changed

package-lock.json

Lines changed: 316 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"devDependencies": {
6565
"@types/node": "^18.15.0",
6666
"@types/ws": "^8.5.10",
67-
"rollup": "^3.19.1",
67+
"rollup": "^4.39.0",
6868
"standard": "^17.1.2",
6969
"typescript": "^4.9.5",
7070
"yjs": "^13.5.0"

rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default [{
22
input: ['./src/server.js', './src/utils.js', './src/callback.js'],
3-
external: id => /^(lib0|yjs|y-protocols|ws|lodash\.debounce|http)/.test(id),
3+
external: id => /^(lib0|yjs|y-protocols|ws|lodash\.debounce|http|y-leveldb)/.test(id),
44
output: [{
55
dir: 'dist',
66
format: 'cjs',

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as decoding from 'lib0/decoding'
77
import * as map from 'lib0/map'
88

99
import * as eventloop from 'lib0/eventloop'
10+
import { LeveldbPersistence } from 'y-leveldb'
1011

1112
import { callbackHandler, isCallbackSet } from './callback.js'
1213

@@ -30,7 +31,6 @@ let persistence = null
3031
if (typeof persistenceDir === 'string') {
3132
console.info('Persisting documents to "' + persistenceDir + '"')
3233
// @ts-ignore
33-
const LeveldbPersistence = (await import('y-leveldb')).LeveldbPersistence
3434
const ldb = new LeveldbPersistence(persistenceDir)
3535
persistence = {
3636
provider: ldb,

0 commit comments

Comments
 (0)