Problem with Amplify in Cocos Creator's Project

Hello,

I’m having an issue using Amplify in my Cocos Creator project.
It’s easy to reproduce. Launch any sample. Add aws-amplify with npm. Then add to any ts file :

import { Amplify } from "aws-amplify";
Amplify.configure({
  Auth: {
	Cognito: {
	  userPoolId: 'whatever',
	  userPoolClientId: 'whatever',
	}
  }
});

Then into Cocos Creator, you will get this issue :
[Scene] Error: Error: Unexpected export statement in CJS module.

Is there a way to resolve this error?
I’ve Googled anything that might help, but to no avail. In the Cocos documentation, I found this information (it’s about Firebase, but seems related to my issue with Amplify):

However, I’m not at all familiar with features like rollups and haven’t figured out how to do it.

If anyone has ever had this issue or has successfully integrated Amplify into a Cocos Creator project, some help would be appreciated.

Thanks