Open jacek-jablonski opened 2 years ago
If its ESM, its likely because there is no default export defined in that module.
If you want to import all exports from the module, you can use a wildcard import * as github from "@actions/github"
.
Although importing the specific export you want to use is best.
Thanks for explanation @styfle. The only thing that is strange about all of this is that no compile-time errors are reported.
Hi, I've got a very simple repository reproducing my problem: https://github.com/jacek-jablonski/example-ncc/
In my code, I import GitHub library and try to use it:
After compiling above with ncc above code produces error:
To fix this problem, I have to import specific function like this:
However, I am still wondering why the first version doesn't work as it should? Do you have any idea why? Thanks.