Closed ir4y closed 12 months ago
Hi @ir4y, thanks for the report. I tested with both yarn build
and yarn build-storybook
, and they succeeded when using antd-phone-input
. The actual problem is in tests, especially at Test storybook step as we can see in the provided reproduction URL. When I suggested the #192 PR, I did not expect the tests will fail. I am not familiar with the test-storybook
, but phone-related cases need to be updated (I am assuming the types need to be changed from 'string' to 'object').
Bug description
The package is using default import to supply the component https://github.com/ArtyomVancyan/antd-phone-input/blob/master/src/index.tsx#L43 Unfortunately, this approach doesn't work when vite is used https://github.com/vitejs/vite/issues/2139
So, Vite users have to use hacks like this https://github.com/beda-software/fhir-emr/commit/ce5425837089fa9a83bb18ebe0cf2f79ec8a0d1c :
I am not sure how to proceed with this bug, but it will inform Vite users and provide them with a workaround.
Reproduction URL
https://github.com/beda-software/fhir-emr/actions/runs/6348145345/job/17244243993
Reproduction steps