diff --git a/lib/dataconnection/StreamConnection/Cbor.ts b/lib/dataconnection/StreamConnection/Cbor.ts index 523fdf0a2..c0b93f0c1 100644 --- a/lib/dataconnection/StreamConnection/Cbor.ts +++ b/lib/dataconnection/StreamConnection/Cbor.ts @@ -1,5 +1,5 @@ import type { Peer } from "../../peer.js"; -import { Decoder, Encoder } from "cbor-x"; +import { Decoder, Encoder } from "cbor-x/index-no-eval"; import { StreamConnection } from "./StreamConnection.js"; const NullValue = Symbol.for(null); diff --git a/tsconfig.json b/tsconfig.json index 7fabb216b..8d0d774ce 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,10 @@ "skipLibCheck": true, "isolatedModules": true, "resolveJsonModule": true, - "lib": ["es2020", "dom"] + "lib": ["es2020", "dom"], + "paths": { + "cbor-x/index-no-eval": ["./node_modules/cbor-x"] + } }, "exclude": ["node_modules", "dist", "e2e"] }