Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions docs/guide/build-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,18 @@ module.exports = merge(baseConfig, {
whitelist: /\.css$/
}),

// This is the plugin that turns the entire output of the server build
// into a single JSON file. The default file name will be
// `vue-ssr-server-bundle.json`

plugins: [
new VueSSRServerPlugin()
// This is the plugin that turns the entire output of the server build
// into a single JSON file. The default file name will be
// `vue-ssr-server-bundle.json`
new VueSSRServerPlugin(),
// To make Vue.prototype.$isServer work, we have to make `VUE_ENV` available
// in the bundled application
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
'process.env.VUE_ENV': '"server"'
}),
]
})
```
Expand Down Expand Up @@ -102,7 +109,14 @@ module.exports = merge(baseConfig, {
}),
// This plugins generates `vue-ssr-client-manifest.json` in the
// output directory.
new VueSSRClientPlugin()
new VueSSRClientPlugin(),

// To make Vue.prototype.$isServer work, we have to make `VUE_ENV` available
// in the bundled application
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
'process.env.VUE_ENV': '"client"'
}),
]
})
```
Expand Down