typesnippet / antd-phone-input

Advanced, highly customizable phone input component for Ant Design.
https://playground.typesnippet.org/antd-phone-input-5.x/
MIT License
60 stars 11 forks source link

🐛 Bug Report - fails to compile for earlier versions of antd 5 #47

Closed ArtyomVancyan closed 1 year ago

ArtyomVancyan commented 1 year ago

Bug description

Compiling fails with antd versions 5.0.x-5.7.x, so it works only for the latest versions. Also, for more stability, it would be nice to perform additional tests with different versions of antd using tox.

Reproduction URL

https://github.com/ArtyomVancyan/antd-phone-input/tree/master/examples/antd5.x

Reproduction steps

  1. cd examples/antd5.x
  2. npm i && npm i antd@5.2.0
  3. npm run build

Logs

Failed to compile.

Attempted import error: 'initComponentToken' is not exported from 'antd/es/input/style' (imported as 'inputHelper').
ERROR in ./node_modules/antd-phone-input/style.js 14:117-147
export 'initComponentToken' (imported as 'inputHelper') was not found in 'antd/es/input/style' (possible exports: default, genActiveStyle, genBasicInputStyle, genDisabledStyle, genHoverStyle, genInputGroupStyle, genInputSmallStyle, genPlaceholderStyle, genStatusStyle, initInputToken)

webpack compiled with 1 error