I am trying to use Coffeescript with ember app kit but it's blowing up when I rename router.js to router.coffee. I am assuming it has to do something with the emc6 module syntax. How do I properly convert it?
Router = Ember.Router.extend()
Router.map ->
@route "component-test"
@route "helper-test"
export default Router
As CoffeScript currently can't parse ES6 module syntax, wrap your import
/export
statements with backticks:
`export default Router`
Hopefully that alone will get it working for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With