This makes it easier to work with this library in ESM projects.
Currently, when I import this library using...
import PushReceiver from '@eneris/push-receiver'
...with moduleResolution set to Node and module set to ES2015 in the tsconfig.json, my project builds fine, but I get a TypeError: PushReceiver is not a constructor when I try to run it.
The workaround would be setting moduleResolution to Node16 or NodeNext and do something like this, which is not ideal:
import _PushReceiver from '@eneris/push-receiver'
const PushReceiver = _PushReceiver.default
Using the named export I've added, everything just works:
import { PushReceiver } from '@eneris/push-receiver'
This makes it easier to work with this library in ESM projects.
Currently, when I import this library using...
...with
moduleResolution
set toNode
andmodule
set toES2015
in the tsconfig.json, my project builds fine, but I get aTypeError: PushReceiver is not a constructor
when I try to run it.The workaround would be setting
moduleResolution
toNode16
orNodeNext
and do something like this, which is not ideal:Using the named export I've added, everything just works: