Browse Source

add diagram in ssr docs

dev
Evan You 8 years ago
parent
commit
71db0bf2a8
  1. 2
      packages/vue-server-renderer/README.md

2
packages/vue-server-renderer/README.md

@ -178,6 +178,8 @@ Instead, it's more straightforward to run our app "fresh" for each request, so t
## Creating the Server Bundle ## Creating the Server Bundle
<img width="973" alt="screen shot 2016-08-11 at 6 06 57 pm" src="https://cloud.githubusercontent.com/assets/499550/17607895/786a415a-5fee-11e6-9c11-45a2cfdf085c.png">
The application bundle can be generated by any build tool, so you can easily use Webpack + `vue-loader` with the bundleRenderer. You do need to use a slightly different webpack config and entry point for your server-side bundle, but the difference is rather minimal: The application bundle can be generated by any build tool, so you can easily use Webpack + `vue-loader` with the bundleRenderer. You do need to use a slightly different webpack config and entry point for your server-side bundle, but the difference is rather minimal:
1. add `target: 'node'`, and use `output: { libraryTarget: 'commonjs2' }` for your webpack config. Also, it's probably a good idea to [externalize your dependencies](#externals). 1. add `target: 'node'`, and use `output: { libraryTarget: 'commonjs2' }` for your webpack config. Also, it's probably a good idea to [externalize your dependencies](#externals).

Loading…
Cancel
Save