We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installed the library, ran a very basic example and got the error TypeError: cig is not a function.
TypeError: cig is not a function
If you run the following code you can see that the default export is actually an object, not the cig function itself:
cig
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.
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...
tsup
export default src_default
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";
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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:> 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
tsup
would just addexport 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:and import it as such:
The text was updated successfully, but these errors were encountered: