【问题标题】:How add orbit-db in bundle?如何在捆绑中添加轨道数据库?
【发布时间】:2021-06-17 18:58:48
【问题描述】:

我想创建 orbitdb 包

在 github 上的 README 中我看到了这个例子

npm install orbit-db ipfs

const IPFS = require('ipfs')
const OrbitDB = require('orbit-db')

我正在使用 es6 import 例如github上的浏览器

// Import IPFS module
import IPFS from 'ipfs'

// Import OrbitDB module from 'orbit-db', eg. directory to its package.json
import OrbitDB from '../../..'

但这不行

我构建 es5 模块

npm run build:es5

它是构建而不是 es5 模块

【问题讨论】:

    标签: ipfs orbitdb


    【解决方案1】:

    要构建 this 示例,请运行以下命令

    npm install
    npm run build:examples
    

    之后,您可以在浏览器中打开examples/browser/browser-webpack-example/index.html

    编辑:我们更新了documentation 以运行示例

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-04
      • 2012-04-01
      • 2013-03-18
      相关资源
      最近更新 更多