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 the types #310

Closed
wants to merge 1 commit into from
Closed

Fix the types #310

wants to merge 1 commit into from

Conversation

demetriusfeijoo
Copy link
Contributor

Issue: EXT-1978

This is the best result so far I've achieved...

I isolated our helper and tried to first fix our library, and the best result I got was

now
image

before
image

I had also tried publint and the result was:

now
image

before
image

PS: It's only considering the field-plugin library, no helper was considered in these tests.

I had tried with tsup and also changes in our vite.config.ts file and I got everything "green" for both cases (only library), however, it was not working for the helpers... the helpers weren't able to resolve the field-plugin's type anymore.

Anyway, here is the example changing only our vite.config.ts file.

Below you can see the result:
image

How to test? (optional)

cd packages/field-plugin

yarn build && npx attw --pack .

# also with publint
yarn build && npx publint

Copy link

vercel bot commented Nov 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
plugin-sandbox ✅ Ready (Inspect) Visit Preview Nov 1, 2023 10:37pm

},
"import": {
"types": "./dist/field-plugin.d.ts",
"default": "./dist/field-plugin.mjs"
Copy link
Contributor

Choose a reason for hiding this comment

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

So, if I understand this result correctly, is the key point to use .mjs for ESM output to be more specific?

@eunjae-lee
Copy link
Contributor

Thanks for the research! Closing this in favor of #313

@eunjae-lee eunjae-lee closed this Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants