File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -398,8 +398,8 @@ In order to develop an app using server-side rendering, we need access to the
398
398
[ ` stats ` ] ( https://github.com/webpack/docs/wiki/node.js-api#stats ) , which is
399
399
generated with each build.
400
400
401
- With server-side rendering enabled, ` webpack-dev-middleware ` sets the ` stats ` to ` res.locals.webpack.devMiddleware.context. stats `
402
- and the filesystem to ` res.locals.webpack.devMiddleware.context. outputFileSystem ` before invoking the next middleware,
401
+ With server-side rendering enabled, ` webpack-dev-middleware ` sets the ` stats ` to ` res.locals.webpack.devMiddleware.stats `
402
+ and the filesystem to ` res.locals.webpack.devMiddleware.outputFileSystem ` before invoking the next middleware,
403
403
allowing a developer to render the page body and manage the response to clients.
404
404
405
405
_ Note: Requests for bundle files will still be handled by
@@ -433,8 +433,8 @@ app.use(middleware(compiler, { serverSideRender: true }));
433
433
// The following middleware would not be invoked until the latest build is finished.
434
434
app .use ((req , res ) => {
435
435
const { devMiddleware } = res .locals .webpack ;
436
- const outputFileSystem = devMiddleware .context . outputFileSystem ;
437
- const jsonWebpackStats = devMiddleware .context . stats .toJson ();
436
+ const outputFileSystem = devMiddleware .outputFileSystem ;
437
+ const jsonWebpackStats = devMiddleware .stats .toJson ();
438
438
const { assetsByChunkName , outputPath } = jsonWebpackStats;
439
439
440
440
// Then use `assetsByChunkName` for server-side rendering
You can’t perform that action at this time.
0 commit comments