【发布时间】:2021-06-28 22:34:22
【问题描述】:
我很难让 AWS Amplify 与 Vite.js 一起工作
// First I was getting this error:
Uncaught ReferenceError: global is not defined
所以,我在 index.html 的 head 部分添加了这个 script
<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
【问题讨论】:
标签: javascript aws-amplify vuejs3 vite aws-amplify-vue