Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

Fix custom transformers when using fork checker #531

Merged
merged 1 commit into from
Feb 24, 2018

Conversation

guncha
Copy link
Contributor

@guncha guncha commented Jan 15, 2018

This is something that we've been using for the past half a year and I thought it'd be good to get it in upstream. Fixes #447.

I guess this does the same thing as this other PR (closes #423) except we're not introducing a new config. If the getCustomTransformers is a string, it's assumed to be a module that can be simply required so either something that can be found in the parent node_modules or an absolute module path. If it's a function, then the code works as before.

Another difference is that the function is not given the Program object. I don't know how useful this is or not, but it can be easily added.

Let me know if you need me to do anything else for this. Probably a test or two would be in order.

When using forked checker mode, it's impossible to pass a custom
function to the checker via the options as it's a different process. To
get around this, we can pass a path to the module that is then exceuted
once the checker is initialized.
@s-panferov
Copy link
Owner

s-panferov commented Jan 16, 2018

Thank you, I'll look through it

@guncha
Copy link
Contributor Author

guncha commented Feb 20, 2018

@s-panferov, what's the kind word? I can look at the CI failure on 2.5.3.

@kimamula
Copy link
Contributor

@s-panferov @guncha The following line

https://github.com/s-panferov/awesome-typescript-loader/pull/531/files#diff-de66cf07555cd70991f012b02db0bd52R422

is removed in the following commit immediately after this PR was merged.

38a772f#diff-de66cf07555cd70991f012b02db0bd52L432

Is this really working?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getCustomTransformers are not being used when running with dev server
3 participants