-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Update docs re: moduleFileExtensions
to add ordering note (left-to-right)
#7616
Conversation
…ray is evaluated in left-to-right order
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also update the versioned docs with this notice?
Codecov Report
@@ Coverage Diff @@
## master #7616 +/- ##
=======================================
Coverage 68.26% 68.26%
=======================================
Files 249 249
Lines 9623 9623
Branches 5 5
=======================================
Hits 6569 6569
Misses 3052 3052
Partials 2 2 Continue to review full report at Codecov.
|
Yeah I think something like "We recommend placing the extensions most commonly used in your project on the left" would be good, otherwise it might not be immediately obvious to everyone. |
Thanks @jeysal, I like that wording. That's a simple addition for the current version, but for the versioned docs, @thymikee, I think it's potentially confusing for that sentence which says implementation is dependent on your project to co-exist with the command that "If you are using TypeScript this should be So for the versioned docs I suggest this rewrite - let me know what you think:
|
@jeffgore00 no reason to bring up "via Also, could you sign the CLA? 😀 |
Thanks @SimenB - I signed the CLA and made edits to all of the versioned_docs as well. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
…m-runtime * upstream/master: add missing truncate comment to recent blog posts (jestjs#7655) use raw serializer for e2e output snapshots (jestjs#7651) chore: use a Set for reserved words list in `jest-mock` Fix automock for numeric function names (jestjs#7653) Update docs re: `moduleFileExtensions` to add ordering note (left-to-right) (jestjs#7616)
Order moduleFileExtensions from most used least used extensions. Sources: https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring and jestjs/jest#7616
Order moduleFileExtensions from most used least used extensions. Sources: https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring and jestjs/jest#7616
Order moduleFileExtensions from most used least used extensions. Sources: https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring and jestjs/jest#7616
Order moduleFileExtensions from most used to least used extensions. Sources: https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring and jestjs/jest#7616
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Adds note that the
moduleFileExtensions
configuration evaluates the array of file extensions from left-to-right. This may seem self-evident, but personally after dealing with Webpack loaders which work in the opposite direction, I think it doesn't hurt to point out.See issue #7563 for the original discussion on this matter. If someone is more knowledgable about performance, perhaps we could also add a note that in a TypeScript project, moving the
.ts
and.tsx
extensions to the beginning could be advantageous (per @thymikee).