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

[Question] - custom fs implementation #172

Closed
dazinator opened this issue Mar 19, 2019 · 5 comments
Closed

[Question] - custom fs implementation #172

dazinator opened this issue Mar 19, 2019 · 5 comments

Comments

@dazinator
Copy link

Hello,

I would like to use an alternative underlying fs implementation, such as memfs or unionfs
I am not sure If I can do this, as NodeJsInputFileSystem seems to be harcoded to use a particular underlying fs implementation. What would be the best way to go about this? Thanks

@alexander-akait
Copy link
Member

Send a PR to allow setup own fs

@dazinator
Copy link
Author

Currently, the methods that access fs are defined at the prototype level:

for (const key of fsMethods) {

I think I'd need to remove that and have them declared at the class instance level, so that if a custom fs is passed in the constructor then that can be used, otherwise fall back to default fs implementation based on the graceful-fs. Does this sound ok with you?

@alexander-akait
Copy link
Member

Yes

dazinator added a commit to dazinator/enhanced-resolve that referenced this issue Mar 19, 2019
@dazinator
Copy link
Author

dazinator commented Mar 19, 2019

Great. PR #173 Submitted!

dazinator added a commit to dazinator/enhanced-resolve that referenced this issue Mar 19, 2019
dazinator added a commit to dazinator/enhanced-resolve that referenced this issue Mar 19, 2019
@sokra
Copy link
Member

sokra commented Jul 4, 2019

fixed, you can pass a fileSystem i. e. fs or memfs

@sokra sokra closed this as completed Jul 4, 2019
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

No branches or pull requests

3 participants