Closed denieler closed 5 years ago
@strothj please review
Awesome. I'll have some time to review this in more detail later today (Sunday).
I think one of the original concerns I had when working on this issue was about potential issues that could occur when using a multi-threaded build (https://github.com/TypeStrong/ts-loader#parallelising-builds). I'm not sure that's a valid concern anyways since the ts-loader
docs now mention there's less benefit to doing that.
@strothj hey! :) how is it going? :) can we merge it?
Thanks for the pull request! I've published this as version 3.1.0
. Let me know if you have any issues and sorry for the delay.
~While it does speed up the build I noticed that it is not working with the latest typescript (3.4.1) 😔~ false alarm. it has nothing to do with this package. the problem is in styled components. see: https://github.com/Microsoft/TypeScript/issues/30663
@strothj can this change be reflected in the underyling react-docgen-typescript
package itself? We are using it directly in a node script and are seeing some very slow compile times as our package grows.
Because we are not reusing the same Typescript instance while parsing ts files there are this issue https://github.com/styleguidist/react-docgen-typescript/issues/112 and this issue https://github.com/strothj/react-docgen-typescript-loader/issues/37.
So here I've created a code, which reuse the same program in between parses in the same way as in
ts-loader
it's done (https://github.com/TypeStrong/ts-loader/blob/master/src/servicesHost.ts)