Thanks Erik,
My question is, so if I want to use traceur non uglified output, I need to preserve the import statement from my external resource so the code doesn't fail on the assigment. My question now is, if I keep my import, I wonder if the close compiler or UglifyJS is smart enough to remove my dependency all together due the inlining of that reference.
Small example
Import {ExternalReference} from './SomeReference.js';
Class A
{
doSomething()
{
DoSomeStuff(ExternalReference.SomeConstant);
}
}
the current traceur output works perfecly because it uses the Import to download the external dependency before running the code and the ExternalReference is a real object.
By running under UglifyJS or Google Closure Compiler, I'm not sure if it will remove that external dependency all together.
If I use the annotation @const for my SomeConstant and remove the import statement, yes, the closure compiler will inline the value and optimize it, but I won't be able to run traceur raw output anymore for debugging purpose.
Am I missing something?