storyblok / field-plugin

Create and deploy Storyblok Field Plugin
https://www.storyblok.com/docs/plugins/field-plugins/introduction
25 stars 3 forks source link

Fix the types #310

Closed demetriusfeijoo closed 9 months ago

demetriusfeijoo commented 9 months ago

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
vercel[bot] commented 9 months ago

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
eunjae-lee commented 9 months ago

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