-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Configurable file system via options.fs #370
Conversation
Changes: * fs option which can be used to configure non-default file system (it is forced to memory-fs in case it is not the same instance) * adding two simple tests
Codecov Report
@@ Coverage Diff @@
## master #370 +/- ##
==========================================
+ Coverage 96.85% 96.93% +0.08%
==========================================
Files 7 7
Lines 254 261 +7
==========================================
+ Hits 246 253 +7
Misses 8 8
Continue to review full report at Codecov.
|
Please accept CLA, please describe use case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some little fixes for docs and we can merge
Waiting CI green and merge 👍 |
if (isMemoryFs) { | ||
if (isConfiguredFs) { | ||
const { fs } = context.options; | ||
if (typeof fs.join !== 'function') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just questions, can you find place where we use fs.join
? Looks like we should remove this/deprecated from code base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not used by the webpack-middleware
but rather by wepback
instead. Here it is as a precaution to avoid digging up webpack's erros. If you attempt to provide fs
without join()
webpack will complain about it when accessing webpack.outputFileSystem
.
I can switch to Russian to explain more if you like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can switch to Russian to explain more if you like.
No need
It is not used by the
webpack-middleware
but rather bywepback
instead. Here it is as a precaution to avoid digging up webpack's erros. If you attempt to providefs
withoutjoin()
webpack will complain about it when accessingwebpack.outputFileSystem
.
I think we should open issue in webpack and remove all fs.join
in webpack@5
, join
is not part of fs
and looks very dirty and misleading
Can you open issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I got no time for that, sorry. May be next time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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
What kind of change does this PR introduce?
(currently, it is forced to use
memory-fs
instead)What are use cases?
Did you add tests for your changes?
Summary
webpackCompiler.outputFileSystem
ormiddleware(..., ..., { fs: fileSystem }
Does this PR introduce a breaking change?