Skip to content

Commit

Permalink
split ssr build on local (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinxh authored Apr 28, 2023
1 parent 00ff2bd commit a0d322a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/pwa-kit-dev/src/configs/webpack/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@ const renderer =
devtool: mode === development ? 'eval-source-map' : false,
output: {
path: buildDir,
filename: 'server-renderer.js',

// We want to split the build on local development to reduce memory usage.
// It is required to have a single entry point for the remote server.
// See pwa-kit-runtime/ssr/server/build-remote-server.js render method.
filename: mode === development ? '[name].js' : 'server-renderer.js',
libraryTarget: 'commonjs2'
},
plugins: [
Expand Down

0 comments on commit a0d322a

Please sign in to comment.