*Move from require to import

This commit is contained in:
Derrick Hammer 2022-07-19 14:43:28 -04:00
parent d7ec437ce3
commit 1c18b041f3
1 changed files with 2 additions and 6 deletions

View File

@ -1,10 +1,6 @@
// tslint:disable:no-var-requires
import { createRequire } from "module";
import RpcQuery from "./rpcQuery.js"; import RpcQuery from "./rpcQuery.js";
// @ts-ignore
const require = createRequire(import.meta.url); import DHT from "@hyperswarm/dht";
const DHT = require("@hyperswarm/dht");
export default class RpcNetwork { export default class RpcNetwork {
private _dht: typeof DHT; private _dht: typeof DHT;