mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-06-07 14:46:37 +00:00
Fix fs-shim
This commit is contained in:
parent
e4e75098b0
commit
9892d57d67
@ -1,4 +1,9 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import where from 'wherearewe'
|
import { isElectronMain } from 'wherearewe'
|
||||||
|
import * as fs_ from 'fs'
|
||||||
|
|
||||||
export const fs = (!where.isElectronMain && (typeof window === 'object' || typeof self === 'object')) ? null : eval('import("fs")')
|
export const fs = (!isElectronMain && (typeof window === 'object' || typeof self === 'object'))
|
||||||
|
? null
|
||||||
|
: fs_
|
||||||
|
|
||||||
|
export default fs
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import * as fs from '../fs-shim.js'
|
import fs from '../fs-shim.js'
|
||||||
import Cache from 'orbit-db-cache'
|
import Cache from 'orbit-db-cache'
|
||||||
import Logger from 'logplease'
|
import Logger from 'logplease'
|
||||||
const logger = Logger.create('orbit-db')
|
const logger = Logger.create('orbit-db')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user