Maybe I'm just lost, but the example of import cbor from 'cbor-web' gives me errors when I call functions. cbor is undefined.
However, checking the cbor-web source, I see export * from 'cbor' is used -- so I tried import * as cbor from 'cbor-web' and it works as expected.
Maybe I'm just doing something incorrectly, but in my Next.js 14 project I can only get the normal require, or the modified import to work.
Maybe I'm just lost, but the example of
import cbor from 'cbor-web'
gives me errors when I call functions. cbor isundefined
. However, checking the cbor-web source, I seeexport * from 'cbor'
is used -- so I triedimport * as cbor from 'cbor-web'
and it works as expected.Maybe I'm just doing something incorrectly, but in my Next.js 14 project I can only get the normal require, or the modified import to work.