我很难让 AWS Amplify 与Vite.js 一起工作
// First I was getting this error:
Uncaught ReferenceError: global is not defined
所以,我script
在 index.html 的head
部分添加了这个
<script>
var global = global || window;
var Buffer = Buffer || [];
var process = process || {
env: { DEBUG: undefined },
version: []
};
</script>
现在,我收到此警告/错误
[Vue warn]: Failed to resolve component: amplify-sign-out
[Vue warn]: Failed to resolve component: amplify-authenticator