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
{{ message }}
This repository was archived by the owner on Mar 29, 2018. It is now read-only.
Currently, I am using EmberScript with Ember CLI. When EmberScript compiles, it places some var declarations at the top. Once this transpiler gets a hold of that JavaScript, it places its declarations after the existing declarations, often causing this:
define("webapp/router",["ember","webapp/config/environment","exports"],function(__dependency1__,__dependency2__,__exports__){"use strict";// Generated by EmberScript 0.0.14varRouter;varset$=Ember.set;varget$=Ember.get;varEmber=__dependency1__["default"];varconfig=__dependency2__["default"];Router=Ember.Router.extend({location: config.locationType});Router.map(function(){returnthis.route('items');});__exports__["default"]=Router;});//# sourceURL=webapp/router.js
As you can see, EmberScript expects Ember to already exist, but the transpiled code doesn't initialize that variable until after it is (attempted to be) accessed. Is there a way to have the transpiler move those var x = __dependency1__["default"] statements to the very top of the function? This could easily resolve issues people are having like ghempton/ember-script#44, ember-cli/ember-cli#1368, and aradabaugh/broccoli-ember-script#1.
The text was updated successfully, but these errors were encountered:
Thanks for filing the issue. As @stefanpenner says, this is not an issue with the current version of the transpiler, so I won't be devoting any time to a fix. Perhaps you could try updating to use the newest version to see if there's some issue with it as well?
Currently, I am using EmberScript with Ember CLI. When EmberScript compiles, it places some
var
declarations at the top. Once this transpiler gets a hold of that JavaScript, it places its declarations after the existing declarations, often causing this:As you can see, EmberScript expects
Ember
to already exist, but the transpiled code doesn't initialize that variable until after it is (attempted to be) accessed. Is there a way to have the transpiler move thosevar x = __dependency1__["default"]
statements to the very top of the function? This could easily resolve issues people are having like ghempton/ember-script#44, ember-cli/ember-cli#1368, and aradabaugh/broccoli-ember-script#1.The text was updated successfully, but these errors were encountered: