翻译中文:I was trying to build an iOS App with Quasar v2v2118 with Vite It went well when I usequasar dev -m iosThen I tried to build the iOS app to test on a real devicequasar build -m iosWhen I launch i
<p>我试图使用Quasar v2(v2.11.8 with Vite)构建一个iOS应用程序。当我使用以下命令时,一切顺利:</p>
<p>quasar dev -m ios</p>
<p>然后,我尝试构建iOS应用程序以在真实设备上测试。</p>
<p>quasar build -m ios</p>
<p>当我使用模拟器或设备启动它时,它只会给我一个空白屏幕(在闪屏之后)。</p>
<p>我使用Safari开发工具进行了调试,并发现index.html抛出了CORS错误:</p>
<p>无法加载资源:Access-Control-Allow-Origin不允许null来源。状态码:0</p>
<p>它尝试加载的资源是生成的index.afjiier.js文件,该文件在index.html中通过以下代码引用:</p>
<script type="module" crossorigin src="index.xxxxxxxx.js" ></script>`
<p>然而,由于cordova使用文件系统托管所有应用程序文件,并且据我所知,文件基础环境中不允许使用type=module。</p>
<p>请给我一些提示,或者我应该尝试webpack吗?谢谢。</p>
原文地址: https://www.cveoy.top/t/topic/0xn 著作权归作者所有。请勿转载和采集!