For bundle size optimization instead of getting components from the lib folder, I am importing it from the es folder.
Example:
import Modal from \'antd