You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was examining our options for #50 and came across some annoying behavior. Because the compiler wraps everything in an IIFE, I can't seem to run generated ES6 module code through Traceur. For example, I ended up with code along the lines of:
but that won't fly because Traceur expects the import to be outside of the IIFE.
For now, I've added an extra task to my Gruntfile to strip out the IIFE. However, we should either have a way to make the IIFE optional, or, preferably, hoist the imports out of it and return the exports from it.
(Or am I doing something horribly wrong? I'm basically compiling my code to ES6, then creating a System.js build from it, and finally loading it in Chrome. With the IIFE patch, that works well.)
The text was updated successfully, but these errors were encountered:
I was examining our options for #50 and came across some annoying behavior. Because the compiler wraps everything in an IIFE, I can't seem to run generated ES6 module code through Traceur. For example, I ended up with code along the lines of:
but that won't fly because Traceur expects the
import
to be outside of the IIFE.For now, I've added an extra task to my Gruntfile to strip out the IIFE. However, we should either have a way to make the IIFE optional, or, preferably, hoist the imports out of it and return the exports from it.
(Or am I doing something horribly wrong? I'm basically compiling my code to ES6, then creating a System.js build from it, and finally loading it in Chrome. With the IIFE patch, that works well.)
The text was updated successfully, but these errors were encountered: