Template literals break IE
Do you want to request a feature or report a bug? This is a bug
What is the current behavior? The page does not open in ie11. I get an error: Invalid character
What is the expected behavior? No error
IE is breaking when it tries to evaluate the template literal here: https://github.com/riot/route/blob/master/dist/cjs.route.js#L59
Per the MDN it doesn't look like those are supported in IE at all. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
Steps to reproduce: Try to use the router in an application loaded into IE11
Hi @bonpixel, try dist/route.js instead.
dist/cjs.route.js is the file for webpack or browserify. You can't use it in browser directly.
@cognitom I see what you mean, however, I actually was trying to use riot-route in a browserify context.
When I require('riot-route') in my index file, the cjs.route.js file is what is bundled. This is what I would expect from reading the package.json but I don't understand how are you recommending that I "require" riot-route given I want it in a browserify bundle?
@bonpixel I see. You're right. I didn't care the case without transpilers like babel or buble. Maybe we should transpile it...
We can simply add buble transpilation here:
https://github.com/riot/route/blob/v3.0.1/rollup.js#L20-L23
OK, now v3.0.2 has been released and dist/cjs.route.js is correctly transpiled. @bonpixel thanks for pointing it out 😉