-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work with scripts included from html #1
Comments
The issue here might actually be that the file is included from an |
I have the same problem in Development Mode, Firefox gives the error: The problem no longer persists when built for production. |
Thanks for the report and apologies for not replying earlier. I'm not entirely sure where to start debugging this… Is it a matter of files not being transpiled on time, or is it due to transpiled files not being placed in the correct path? I looked at the rollup docs and perhaps this plugin may need to grab onto one of the build hooks in order to force a render at a specific time, but I'm not sure if that's the proper way to look at this problem. I'm a bit tied up with work at the moment, but I'll see if I can take a closer look at this soon, |
I suppose that references to vitejs/vite#9963 upd: |
FWIW, this newer plugin (which uses "unplugin" to work for Vite and lots of other build systems) works much better in this respect (for Civet). Perhaps it could inspire a CoffeeScript plugin? In particular I think the idea is to do transpilation in the load phase. (But see the (short) code for details.) |
Chrome gives the error:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/coffeescript". Strict MIME type checking is enforced for module scripts per HTML spec.
I believe the filename needs to be mapped to
.js
(or maybe.jsx
depending on whether there is JSX? maybe not)... Here is another plugin which does so.The text was updated successfully, but these errors were encountered: