최근 검색


최근 검색 없음

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


댓글을 남기려면 로그인하세요.

원하는 정보를 못 찾으셨나요?

새 게시물