I updated one of my notebooks to use a file attachment to store a dependency since bundle.run was down for a while. I managed to get the required JS file and make it a File Attachment. Initially, import
ing it worked:
parseColor = import(await FileAttachment("parse-color.js").url()).then(
m => m.default
)
However, upon reloading the page, the attachment was fetched from the server with a MIME type of application/octet-stream
, leading to this error:
parseColor = TypeError: 'application/octet-stream' is not a valid JavaScript MIME type.
Would it be possible to fix this or should I use another place to host the JS file?
require
works, so that’s a workaround for now.