thlorenz/es6ify

All modules "use strict"

Closed this issue · 4 comments

Not sure if this is an issue with es6ify 1.x or with Traceur, but after compilation all modules had "use strict" - which obviously broke everything - there's no control over 3rd party modules, so this behaviour is probably not desirable.

which obviously broke everything

I don't see how that could be the case.

All modules are wrapped in a function and therefore the use strict only affects code inside that very function since it's function scoped at that point. So it wouldn't affect any code that you add to the browserify bundle since it'd be outside of that function.

Regardless, es6ify doesn't add any use strict anywhere, this is done by traceur, so if this is still an issue for you please raise it there.

I don't see how that would would be the case.

It was added into every module, incl. 3rd party modules. I'll double check with traceur when I catch a break.

It will be added into every module that you transpile.
Possibly look into es6ify.configure in order to transpile files more selectively.

Hope that helps.

I guess being more selective is the right solution here - not sure if it's worth trying to convince anyone that traceur shouldn't modify files when they don't have any ES6 features.

Thanks.