vydimitrov / react-countdown-circle-timer

Lightweight React/React Native countdown timer component with color and progress animation based on SVG
MIT License
692 stars 87 forks source link

use pnpm/npm/yarn can build , can't found @countdown/shared #193

Closed awkj closed 2 years ago

awkj commented 2 years ago

image

image

I use vite to preview and run my app, I found if vite dev , than it will work ,but vite build has this error, and vscode can't find the dependecies, when I delete it ,the lib work prefect, I guess you forget delete it ?

image
vydimitrov commented 2 years ago

Hey @awkj, thanks for reporting this issue. I am not sure what are you trying to do. Are you trying to use the hook? I guess this is only type error, because the hook code is bundled together with component, and does not have any external dependencies.

vydimitrov commented 2 years ago

It it works fine in Codesanbox - https://codesandbox.io/s/stupefied-cray-z2o4t?file=/src/App.tsx, I just need to understand how you use it. I know what there is a problem with the types, since I was not able to find a way to bundle them as well. When TS sees the third part import (my own shared package) then it just references them but does not add them to the output declarations.

awkj commented 2 years ago

I think your build package is have type problem( I'm react beginner, so sorry I can't give your fix help),

If you want retry this problem, you can jump to the file 'countdownCircleTimer.d.ts‘ and will see the tips.

image
vydimitrov commented 2 years ago

Yup, I am aware of the type problem... it is just that I am not able to bundle the types when bundling the code. But nevertheless the code works as expected. I will keep the bug open and try to find a way to add the types to the package.

vydimitrov commented 2 years ago

Hey @awkj, this issue is now fixed in 3.0.9 Please check it let me know if it works as expected.