somlor/sprockets-illusionist — pull request #1 by charlesdemers (2014-06-09 13:17:14+00:00)
Title: Fix ES6 module initialization

Hi Sean,

Charles from Mirego here. Glad you like our project :smiley:

I felt a pull request would be the best way to show you how to make it work.

So there were 2 things that prevented your code from working:

1. Every time you use the `.js.es6` extension, `sprockets-illusionist` transpiles that file into a module. Since your main application file (`app.js.es6`) is a module, you need to require it in `application.js`. We use `require` as opposed to `import` because obviously `application.js` can’t be transpiled because then it would also need to be `require`’d.

2. Little mistake, your `Cat` module wasn’t named properly :wink:

Feel free to create an issue flagged as `question` on the [`sprockets-illusionist`](https://github.com/mirego/sprockets-illusionist) repo if you ever have more questions.