nanxiaobei / antd-img-crop

🗡 An image cropper for Ant Design Upload
MIT License
497 stars 156 forks source link

Not able to use when upgrading from antd v4 to v5 #212

Closed iajaysharma closed 1 year ago

iajaysharma commented 1 year ago

image

nanxiaobei commented 1 year ago

It's from antd source code I guess, because antd-img-crop does not have the @babel/runtime dep. can refer https://www.google.com/search?q=Cannot+use+import+statement+outside+a+module

iajaysharma commented 1 year ago

So here is the solution: If you are using this in Next js you need to use dynamic import to import "antd-img-crop" . image