requirejs/require-cs

sourceMap Location comment in Internet Explorer

Closed this issue · 2 comments

Discovered http://www.trdev.co.uk/2011/05/17/ie-gotchas-using-the-coffeescript-plugin-for-requirejs/

My scenario is a little bit different. My main app template has a conditional comment. Loads after this via ajax do not have conditional comments, so the cs.js adds the @sourcemap url which causes IE to break.

I had to add /*@cc_on @*/ before your /*@if (@_jscript) @else @*/ check to allow IE to function properly.

I would prefer to not always turn on conditional comments when running in IE for any project that uses the coffeescript plugin.

What about turning them on in your app before the first load of a module? Maybe doing a script /*@cc_on*/ end script before the requirejs tag would be enough?

I think that fixes it (Need to run some more tests), and it's a better solution that forcing them on every time in cs.js. Thank you