Skip to content

Commit 9beed01

Browse files
committed
docs: clarify vue-template-compiler as a peer dep
1 parent 87f0a2f commit 9beed01

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Diff for: docs/guide/README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,21 @@ If you are not interested in manually setting up webpack, it is recommended to s
66

77
Follow this guide if the built-in configuration of Vue CLI does not suit your needs, or you'd rather create your own webpack config from scratch.
88

9-
## Manual Configuration
9+
## Manual Setup
10+
11+
### Installation
12+
13+
Unless you are an advanced user using your own forked version of Vue's template compiler, you should install `vue-loader` and `vue-template-compiler` together:
14+
15+
``` bash
16+
npm install -D vue-loader vue-template-compiler
17+
```
18+
19+
The reason `vue-template-compiler` has to be installed separately is so that you can individually specify its version.
20+
21+
Every time a new version of `vue` is released, a corresponding version of `vue-template-compiler` is released together. The compiler's version must be in sync with the base `vue` package so that `vue-loader` produces code that is compatible with the runtime. This means **every time you upgrade `vue` in your project, you should upgrade `vue-template-compiler` to match it as well.**
22+
23+
### webpack Configuration
1024

1125
Vue Loader's configuration is a bit different from other loaders. In addition to a rule that applies `vue-loader` to any files with extension `.vue`, make sure to add Vue Loader's plugin to your webpack config:
1226

0 commit comments

Comments
 (0)