Skip to content
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

Adds the configuration for PnP/Typescript #6856

Merged
merged 4 commits into from
May 1, 2019

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented Apr 20, 2019

The fork-ts-checker-webpack-plugin package just released an update that allows to specify custom resolution schemes. This makes it possible for Create-React-App to have native PnP support even when using TypeScript.

I've tested this diff locally and it seemed to work.

@johnnyreilly
Copy link
Contributor

Fast work!

Question: I don't see usage of the https://github.com/arcanis/pnp-webpack-plugin in this PR. Is use of the pnp-webpack-plugin no longer required when working with webpack?

@arcanis
Copy link
Contributor Author

arcanis commented Apr 20, 2019

Until webpack/enhanced-resolve#168 gets merged the pnp-webpack-plugin package is needed for everything that uses enhanced-resolve (basically Webpack itself). Since it's already been configured in #5136 I don't need to add anything else.

In the case of TypeScript, since it uses its own resolution instead of enhanced-resolve, the only package that I need to add is ts-pnp, which connects the living PnP environment with the existing TypeScript resolution algorithms.

@ianschmitz ianschmitz added this to the 3.x milestone Apr 20, 2019
@ianschmitz
Copy link
Contributor

Thanks @arcanis. Does Jest work as expected with this PR?

@arcanis
Copy link
Contributor Author

arcanis commented Apr 21, 2019

Yep - running yarn test then pressing a got the default test green.

As far as I can remember, Jest just uses Babel to strip the TS types, so no particular TS resolution involved - it simply uses the classic Jest resolution (which supports PnP out of the box since 24.5).

@crubier
Copy link

crubier commented Apr 24, 2019

Can't wait for this aha

@iansu iansu modified the milestones: 3.x, 3.0.1 Apr 24, 2019
@iansu iansu self-assigned this Apr 24, 2019
@arcanis
Copy link
Contributor Author

arcanis commented May 1, 2019

Any blocker?

@iansu
Copy link
Contributor

iansu commented May 1, 2019

No, I think this looks good. Thanks for the reminder. 😀

@iansu iansu merged commit b36d1ea into facebook:master May 1, 2019
@iansu
Copy link
Contributor

iansu commented May 1, 2019

Thanks! ❤️

@lock lock bot locked and limited conversation to collaborators May 6, 2019
@arcanis arcanis deleted the resolve-module-name-module branch May 21, 2019 12:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants