Skip to content

Commit

Permalink
fix(bundler import): enable module target
Browse files Browse the repository at this point in the history
Default imports from cjs imports differ between implementations. Avoiding this by providing es6 directly increases compatibility. Bundlers usually prefer this import over main.

Closes #761
  • Loading branch information
jonasgloning committed May 12, 2022
1 parent 19d4d5b commit b5beec4
Show file tree
Hide file tree
Showing 4 changed files with 765 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "@parcel/config-default",
"transformers": {
"*.{ts,tsx}": ["parcel-transformer-tsc-sourcemaps"]
}
}
4 changes: 3 additions & 1 deletion lib/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import * as BinaryPack from "peerjs-js-binarypack";
// Types aren’t accurate
//@ts-ignore
import BinaryPack from "peerjs-js-binarypack";
import { Supports } from "./supports";

interface UtilSupportsObj {
Expand Down
Loading

0 comments on commit b5beec4

Please sign in to comment.