I have a small static project written in ES6. It's compiled with Traceur dynamically every reload (for development purposes):
<script src="lib/traceur/traceur.js" type="text/javascript"></script>
<script src="lib/traceur/bootstrap.js" type="text/javascript"></script>
<script>
traceur.options.experimental = true;
traceur.options.sourceMaps = true;
</script>
<!-- my ES6 code goes here -->
<script type="module" src="main.js"></script>
The contents of bootstrap.js
are rather simple:
new traceur.WebPageTranscoder(document.location.href).run();
Now, I can't get the source maps to work (Chrome 34). The manual suggests the file should be compiled offline and served with appropriate header, but that's precisely what I was trying to avoid.
Is there a way to get source maps to work entirely from the client side?