最近搜索


没有最近搜索

Unable to upload packaged support app that includes TypeScript files



已于 2023年2月08日 发布

Hello! 

I have a fairly simple sidebar app written in TypeScript (vanilla JS, no frameworks). I'm using Parcel 2 for bundling all assets into a single dist directory, which my manifest.json points to as the sidebar app url. However whenever I package (using ZAT) and upload the app, I receive a "MIME type not supported" error. I'm able to workaround this by removing any TypeScript files that are included in the zipped filed then re-zipping. Then the app loads, however it's missing the javascript. It appears this is because the script type is "module", as I'm able to again work around this by manually updating to "application/javascript". Obviously neither of these workarounds are ideal!

Was wondering if anyone could shed any light as to why this is happening as well as provide some guidance on how to potentially update so that this isn't a manual process.

Extra deets:  The html output from Parcel includes two script tags, one of type module and the other "nomodule" for browsers that don't support. I don't necessarily need to utilize ES modules in production as I'm only using the single JavaScript file.

Thanks!


0

1

1 条评论

image avatar

Christopher Kennedy

Zendesk Developer Advocacy

Hi Eric,
 
Does this happen when you try to package the app using ZCLI?  It's our successor to ZAT that will eventually replace it.  Let me know if you run into an issue with setup.

0


请先登录再写评论。

找不到所需的内容?

新建帖子