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

When available, use resolve data already present in most modules #114

Merged
merged 3 commits into from Jan 22, 2022

Conversation

markjm
Copy link
Contributor

@markjm markjm commented Jan 11, 2022

All/most NormalModules carry their resolveRequest information along with them from the initial resolving of the module. When available, we can skip all our processing and fs access for those modules.

Doing so broke the current abstraction of a ModuleFileIterator, so I changed it to be an "inner module" iterator to more match what its doing.

You can see the typedef here
https://github.com/markjm/webpack/blob/16784692d3c3a8985327dd9a5665bf319d8aec1b/types.d.ts#L440-L448

@markjm
Copy link
Contributor Author

markjm commented Jan 18, 2022

@xz64 these changes should greatly reduce fs calls for this plugin in all typical cases

@xz64 xz64 self-requested a review January 22, 2022 03:54
@xz64 xz64 merged commit 55dd3f8 into xz64:master Jan 22, 2022
@xz64
Copy link
Owner

xz64 commented Jan 22, 2022

@markjm Thanks for your contribution!

@markjm
Copy link
Contributor Author

markjm commented Jan 23, 2022

Thanks - mind cutting a new release?

@markjm markjm deleted the markjm/use-resolve-data branch January 23, 2022 19:51
@xz64
Copy link
Owner

xz64 commented Jan 27, 2022

@markjm This is published in v4.0.1 now

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

Successfully merging this pull request may close these issues.

None yet

2 participants