-
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
support for plugins / support for jsx #34
Comments
As a React neophyte myself, I have a personal interest in making this work. However, I don't want to build in any React-specific extensions into How it works today
The code that performs the actual filesystem work to turn a filename into file contents lives here. Note that, as it stands now, this means that the TypeScript compiler can request files that, up to that point, were not even necessarily known to be part of the source. They don't have to be set up within Browserify at all. That means that they aren't part of the Browserify pipeline. This is the reason that That's the first half of how Then, Browserify parses the transformed output for In the unlikely event that Browserify attempts to transform a TypeScript file not in the compilation cache, we do an extra compilation step immediately, and suffer a performance penalty as as result. (As far as I know, this can only happen if you How to fix?So, uh, this will definitely be complicated. There's sort of a weird circular problem: if you have I might get to this sooner rather than later, but I do have quite a lot on my plate at the moment. Discussion (or even PRs!) super welcome. |
Hm, as far as I understand there is even the bigger problem that I cannot run any transformation steps before tsify has started, only after tsify compilation is complete ... |
Yeah, that's basically for two reasons. One, because |
Note that it is possible that this will be pulled into the core compiler at some point: microsoft/TypeScript#2673 |
More relevant discussion: microsoft/TypeScript#3203 |
JSX support was added to Typescript master recently -- I'm guessing it just needs to be released to npm before you can update the version of |
Yes, it's already available in the |
@smrq I hit this same "issue" while trying to implement Aurelia 2 conventions for browserify. We need to inject some code (so user don't need to write boilerplate) to the source code before compiler sees it. I can successfully do it with babelify, but only find out tsify bypassed my transform. I am not sure what I can do to support TS+browserify. |
As outlined above, this is not possible with
Perhaps you could use a TypeScript transform to do what you need? IDK, but reimplementing |
Thx @cartant for the information! We will hold TS+browserify support now. BTW TypeScript transform requires direct compiler API call which tsify needs to open that up. I am not asking for the feature, as it also requires significant investment from our side too. |
Hey,
I wanted to use jsx in typescript. Therefore I planned to use something like ts-jsx-loader which replaces the jsx with plain js before passing it to the typescript compiler. At the moment I do not see any other possibility but to fork and adjust tsify ...
Do you have any other suggestions?
The text was updated successfully, but these errors were encountered: