Skip to content

Serve files from an in-memory file system #1985

Answered by alexvgjm
alexvgjm asked this question in Q&A
Discussion options

You must be logged in to vote

Problem solved. I understand that BrowserSync works with fs. So I had no choice but to patch the fs globally in some way that would keep the original filesystem.

Using memfs + unionfs + fs-monkey

memfs to create the virtual volume.
unionfs to combine the virtual + real filesystem.
fs-monkey to monkey-patch the fs with the new virtual+real fs.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alexvgjm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant