-
-
Notifications
You must be signed in to change notification settings - Fork 382
Configurable file system via options.fs #370
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,9 +60,21 @@ module.exports = { | |
|
|
||
| let fileSystem; | ||
| // store our files in memory | ||
| const isMemoryFs = !compiler.compilers && compiler.outputFileSystem instanceof MemoryFileSystem; | ||
| const isConfiguredFs = context.options.fs; | ||
| const isMemoryFs = !isConfiguredFs | ||
| && !compiler.compilers | ||
| && compiler.outputFileSystem instanceof MemoryFileSystem; | ||
|
|
||
| if (isMemoryFs) { | ||
| if (isConfiguredFs) { | ||
| const { fs } = context.options; | ||
| if (typeof fs.join !== 'function') { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just questions, can you find place where we use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not used by the I can switch to Russian to explain more if you like.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
No need
I think we should open issue in webpack and remove all Can you open issue?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well I got no time for that, sorry. May be next time.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hinell i mean just create issue in webpack repo and all, i am from mobile and it is hard for me right now |
||
| // very shallow check | ||
| throw new Error('Invalid options: options.fs.join() method is expected'); | ||
| } | ||
|
|
||
| compiler.outputFileSystem = fs; | ||
| fileSystem = fs; | ||
| } else if (isMemoryFs) { | ||
| fileSystem = compiler.outputFileSystem; | ||
| } else { | ||
| fileSystem = new MemoryFileSystem(); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.