-
-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(middleware): expose the memory filesystem (response.locals.fs
)
#337
feat(middleware): expose the memory filesystem (response.locals.fs
)
#337
Conversation
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.
Looks good can we create test for this?
If you mean a test in the git clone --single-branch -b samples2 https://github.com/ferdinando-ferreira/webpack-dev-middleware.git
cd webpack-dev-middleware
npm install
cd samples
cd vue-ssr
npm install
npm run dev It is the exact same vuejs SSR example. |
Codecov Report
@@ Coverage Diff @@
## master #337 +/- ##
=======================================
Coverage 96.82% 96.82%
=======================================
Files 7 7
Lines 252 252
=======================================
Hits 244 244
Misses 8 8
Continue to review full report at Codecov.
|
@ferdinando-ferreira we need add test to avoid removing this in future (accidentally) |
locals.fs
)
@ferdinando-ferreira Could you please add docs about this? (e.g to the README's SSR example) |
1a285fb
@michael-ciniawsky: done. |
@michael-ciniawsky: everything OK with the proposed changes? |
locals.fs
)response.locals.fs
)
response.locals.fs
)response.locals.fs
)
@michael-ciniawsky looks we should do minor release |
Released in |
What kind of change does this PR introduce?
feature
Did you add tests for your changes?
yes
Summary
In order for the next middleware in line to be able to use the memory FileSystem created by
webpack-dev-middleware
(and access the files generated in memory by the compilation process) this commit passes the context.fs to the res.locals along with webpackStats when ServerSideRender is set to true.Does this PR introduce a breaking change?
No
Other information
This is a PR is contingent on ServerSideRender not being removed from the middleware