Template literals break IE #77

bonpixel opened this Issue Dec 2, 2016 · 5 comments


None yet

2 participants

bonpixel commented Dec 2, 2016 edited

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:

Per the MDN it doesn't look like those are supported in IE at all.

Steps to reproduce:
Try to use the router in an application loaded into IE11

@bonpixel bonpixel changed the title from Template literals breaks IE to Template literals break IE Dec 2, 2016
cognitom commented Dec 2, 2016

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 cognitom closed this Dec 2, 2016
@cognitom cognitom added the answered label Dec 2, 2016
bonpixel commented Dec 2, 2016 edited

@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?

cognitom commented Dec 2, 2016

@bonpixel I see. You're right. I didn't care the case without transpilers like babel or buble. Maybe we should transpile it...

@cognitom cognitom reopened this Dec 2, 2016
cognitom commented Dec 2, 2016

We can simply add buble transpilation here:

@cognitom cognitom added a commit that closed this issue Dec 3, 2016
@cognitom cognitom Closes #77 3e2d7c8
@cognitom cognitom closed this in 3e2d7c8 Dec 3, 2016
cognitom commented Dec 3, 2016

OK, now v3.0.2 has been released and dist/cjs.route.js is correctly transpiled. @bonpixel thanks for pointing it out 😉

@cognitom cognitom added the enhancement label Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment