Installed the library, ran a very basic example and got the error TypeError: cig is not a function.
Runtime
If you run the following code you can see that the default export is actually an object, not the cig function itself:
import cig, { z } from "cigs";
console.log(cig);
> node dist/index.js
{ default: [Getter], z: [Getter] }
So it appears that there's something wrong with the default export.
Compile time
I checked the compiled JS source files and the export looks like this:
var src_default = cig;
export {
src_default as default,
z3 as z
};
You'd expect that tsup would just add export default src_default at compile time but for some reason it doesn't...
Related issue: egoist/tsup#985
I'm not sure how you want to continue with this.
The easy work-around is to simply export cig as a named export:
// src/index.ts:19
export { z, cig };
and import it as such:
import { cig, z } from "cigs";
Installed the library, ran a very basic example and got the error
TypeError: cig is not a function.Runtime
If you run the following code you can see that the default export is actually an object, not the
cigfunction itself:> node dist/index.js { default: [Getter], z: [Getter] }So it appears that there's something wrong with the default export.
Compile time
I checked the compiled JS source files and the export looks like this:
You'd expect that
tsupwould just addexport default src_defaultat compile time but for some reason it doesn't...Related issue: egoist/tsup#985
I'm not sure how you want to continue with this.
The easy work-around is to simply export
cigas a named export:and import it as such: