我遵循下面的官方链接文件official link。 << ng serve可以正常工作,但是当我build并访问该页面时,它显示错误,例如“ AWSIoTProvider不是构造函数”。我对此没有任何解决方案。
import { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers';
Amplify.addPluggable(new AWSIoTProvider({
aws_pubsub_region: '<YOUR-IOT-REGION>',
aws_pubsub_endpoint: 'wss://xxxxxxxxxxxxx.iot.<YOUR-IOT-REGION>.amazonaws.com/mqtt',
}));