Skip to content
New issue

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

fix(pkg): add main field #678

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ async function main() {
{
...pkg,
files: ["dist-*/**", "bin/**"],
// Tooling currently are having issues with the "exports" field, ex: TypeScript, eslint
// We add a `main` and `types` field to the package.json for the time being
// See https://github.com/octokit/core.js/pulls/662
main: "dist-bundle/index.js",
types: "dist-types/index.d.ts",
exports: {
".": {
types: "./dist-types/index.d.ts",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you try to replace with exports: "./dist-bundle/index.js" and just add the types key to the pkg root?

Copy link
Member Author

@wolfy1339 wolfy1339 Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not just ncc, typescript, and eslint as well are having some issues resolving Octokit packages.

I have tried that syntax and I had some issues.

Might just try again.

As for comments, we can leave one in the build file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for comments, we can leave one in the build file

right!

Expand Down
Loading