Request: Please fix usage of module scripts in local development with fdk
When loading scripts with type module:
<script type="module" src="./assets/index.js"></script>
the following error is thrown due to the wrong content type “text/html” being set for the response by the express server.
Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
Solution: In fdk folder lib/routes/iframe.js
change line 167 to:
return res.type('application/javascript').send(script);
then the response content type is set correctly to ‘application/javascript’.