Skip to content

Doc EN: Hello and Webpack case #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2017
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Before using SSR for your app, the first question you should ask it whether you

If you're only investigating SSR to improve the SEO of a handful of marketing pages (e.g. `/`, `/about`, `/contact`, etc), then you probably want __prerendering__ instead. Rather than using a web server to compile HTML on-the-fly, prerendering simply generates static HTML files for specific routes at build time. The advantage is setting up prerendering is much simpler and allows you to keep your frontend as a fully static site.

If you're using Webpack, you can easily add prerendering with the [prerender-spa-plugin](https://github.com/chrisvfritz/prerender-spa-plugin). It's been extensively tested with Vue apps - and in fact, [the creator](https://github.com/chrisvfritz) is a member of the Vue core team.
If you're using webpack, you can easily add prerendering with the [prerender-spa-plugin](https://github.com/chrisvfritz/prerender-spa-plugin). It's been extensively tested with Vue apps - and in fact, [the creator](https://github.com/chrisvfritz) is a member of the Vue core team.

## About This Guide

Expand Down
2 changes: 1 addition & 1 deletion en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
- [basedir](api.md#basedir)
- [cache](api.md#cache)
- [directives](api.md#directives)
- [Webpack Plugins](api.md#webpack-plugins)
- [webpack Plugins](api.md#webpack-plugins)
2 changes: 1 addition & 1 deletion en/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ See [Introducing the Server Bundle](./bundle-renderer.md) and [Build Configurati

As an example, check out [`v-show`'s server-side implementation](https://github.com/vuejs/vue/blob/dev/src/platforms/web/server/directives/show.js).

## Webpack Plugins
## webpack Plugins

The webpack plugins are provided as standalone files and should be required directly:

Expand Down
4 changes: 2 additions & 2 deletions en/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const renderer = require('vue-server-renderer').createRenderer()
renderer.renderToString(app, (err, html) => {
if (err) throw err
console.log(html)
// => <div data-server-rendered="true">hello world</div>
// => <div data-server-rendered="true">Hello World</div>
})
```

Expand Down Expand Up @@ -134,7 +134,7 @@ const context = {
}

renderer.renderToString(app, context, (err, html) => {
// page title will be "hello"
// page title will be "Hello"
// with meta tags injected
})
```
Expand Down
2 changes: 1 addition & 1 deletion en/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ So the basic idea is we will be using webpack to bundle our app for both client

We will discuss the details of the setup in later sections - for now, let's just assume we've got the build setup figured out and we can write our Vue app code with webpack enabled.

## Code Structure with Webpack
## Code Structure with webpack

Now that we are using webpack to process the app for both server and client, the majority of our source code can be written in a universal fashion, with access to all the webpack-powered features. At the same time, there are [a number of things](./universal.md) you should keep in mind when writing universal code.

Expand Down