-
-
Notifications
You must be signed in to change notification settings - Fork 694
Expand file tree
/
Copy pathimport-wrapper.mjs
More file actions
17 lines (16 loc) · 848 Bytes
/
import-wrapper.mjs
File metadata and controls
17 lines (16 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Making the module version consumable via require - to prohibit
// multiple occurrancies of the same module in the same app
// (dual package hazard, https://nodejs.org/api/packages.html#dual-package-hazard)
import _Dexie from "./dist/dexie.js";
const DexieSymbol = Symbol.for("Dexie");
const Dexie = globalThis[DexieSymbol] || (globalThis[DexieSymbol] = _Dexie);
if (_Dexie.semVer !== Dexie.semVer) {
throw new Error(`Two different versions of Dexie loaded in the same app: ${_Dexie.semVer} and ${Dexie.semVer}`);
}
const { liveQuery, mergeRanges, rangesOverlap, RangeSet, cmp, Entity,
PropModification, replacePrefix, add, remove,
DexieYProvider } = Dexie;
export { liveQuery, mergeRanges, rangesOverlap, RangeSet, cmp, Dexie, Entity,
PropModification, replacePrefix, add, remove,
DexieYProvider};
export default Dexie;