Skip to content

Commit 6672db1

Browse files
docs: add installation notes about compiler-sfc and bundlers (#1068)
1 parent 514943e commit 6672db1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/guide/installation.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,25 @@ The files can be browsed and downloaded from a CDN such as [unpkg](https://unpkg
4545

4646
## npm
4747

48-
npm is the recommended installation method when building large scale applications with Vue. It pairs nicely with module bundlers such as [Webpack](https://webpack.js.org/) or [Rollup](https://rollupjs.org/). Vue also provides accompanying tools for authoring [Single File Components](../guide/single-file-component.html).
48+
npm is the recommended installation method when building large scale applications with Vue. It pairs nicely with module bundlers such as [webpack](https://webpack.js.org/) or [Rollup](https://rollupjs.org/).
4949

5050
```bash
5151
# latest stable
5252
$ npm install vue@next
5353
```
5454

55+
Vue also provides accompanying tools for authoring [Single File Components](../guide/single-file-component.html) (SFCs). If you want to use SFCs then you'll also need to install `@vue/compiler-sfc`:
56+
57+
```bash
58+
$ npm install -D @vue/compiler-sfc
59+
```
60+
61+
If you're coming from Vue 2 then note that `@vue/compiler-sfc` replaces `vue-template-compiler`.
62+
63+
In addition to `@vue/compiler-sfc`, you'll also need a suitable SFC loader or plugin for your chosen bundler. See the [SFC documentation](../guide/single-file-component.html) for more information.
64+
65+
In most cases, the preferred way to create a webpack build with minimal configuration is to use Vue CLI.
66+
5567
## CLI
5668

5769
Vue provides an [official CLI](https://github.com/vuejs/vue-cli) for quickly scaffolding ambitious Single Page Applications. It provides batteries-included build setups for a modern frontend workflow. It takes only a few minutes to get up and running with hot-reload, lint-on-save, and production-ready builds. See [the Vue CLI docs](https://cli.vuejs.org) for more details.

0 commit comments

Comments
 (0)