Allow passing options to `resolve` by Jimbly · Pull Request #2009 · browserify/browserify · GitHub
Skip to content

Allow passing options to resolve - #2009

Open
Jimbly wants to merge 1 commit into
browserify:masterfrom
Jimbly:add_resolve_options
Open

Jimbly wants to merge 1 commit into
browserify:masterfrom
Jimbly:add_resolve_options

Conversation

@Jimbly

@Jimbly Jimbly commented May 14, 2021

Copy link
Copy Markdown

This allows passing options such as readFile/isFile/isDirectory down to resolve.

I needed this while integrating browserify into a new build system that tracks dependencies for minimal rebuilds. The existing hooks (persistentCache and such) only get called if a file exists (was found by resolve), so if resolve doesn't find a particular file, and that file is added later, there's no evidence in any of our recorded dependencies that the bundle needs to be regenerated. Additionally, without this, it seems there's no way to cache (or load from a virtual file system) the package.json files resolve is loading when resolving dependencies.

Is there something already existing that I'm missing that would provide this information?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant