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