-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES5 not supported? #11
Comments
Are you sure that you are including |
ah, i don't have the exact setup as i've since overwritten it to something that precompiles the typescript before handing it to browserify. But to recreate the tsify implementation, it was something like:
Is it possibly todo with the fact that i'm adding classes using |
Oh, that's an interesting setup. Yeah, that could very well be the culprit. One other thing that comes to mind immediately is that every file passed to
|
yeah i was initially worried about that too but to its credit browserify doesn't have any trouble with this approach as far as i can tell. Things run great, even with my code mess ;) thanx for taking a look, be keen to see if a pure browserify implementation is possible as it would open the door to other possibilities like using watchify on my codebase |
Oh, I take it back! Never respond to issues while drinking margaritas. :) Using |
I fixed a small error on this end, but ultimately this issue is caused by browserify/browserify#937. Blocking on resolution of this issue. In the meantime, specify at least one file as an entry point! |
aha! ok interesting, will try it out. thanks for the update |
Fixed way upstream in module-deps@3.5.8! No more hacks needed. |
When trying to run browserify with tsify on my own typescript codebase, i get the following error:
after trying to get to the bottom of what this means, i happened across the esprima-fb module, which seems to be used by browserify to walk the source tree for dependencies.
Because Typescript is using ES5 spec, my imports are written (in the case of the erroring file above) as follows:
this of course doesn't match the ES6 spec, which appears to be what esprima-fb is using and why the error is generated by browserify.
Is there a strategy for ES5 typescript files that will work with tsify, or are we only able to consider ES3-compatible imports atm? Obviously having ES6-compatible imports in .ts files would be pointless for compilation purposes
The text was updated successfully, but these errors were encountered: