1

According to the site you can compile inline CoffeeScript using this. How can I compile embedded .coffee files, though? Those that are sourced externally like:

<script src="js/script.coffee"></script>

I tried adding coffeescript to the file type but I get this:

Resource interpreted as Script but transferred with MIME type text/plain: "file:///C:/Documents%20and%20Settings/public/%E6%A1%8C%E9%9D%A2/coffetest/js/script.coffee". index.html:23 XMLHttpRequest cannot load file:///C:/Documents%20and%20Settings/public/%E6%A1%8C%E9%9D%A2/coffetest/js/script.coffee. Cross origin requests are only supported for HTTP.

1 Answer 1

1

I think you have to use the attribute "type" for your coffee-scripts tags.

<script src="..." type=”text/coffeescript”></script>
<script type=”text/coffeescript”>...</script>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.