You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/guide/installation.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,23 +47,23 @@ $ npm install vue
47
47
48
48
There are two builds available, the standalone build and the runtime-only build.
49
49
50
-
- The standalone build includes the compiler and supports the `template` option.
50
+
- The standalone build includes the compiler and supports the `template` option.**It also relies on the presence of browser APIs so you cannot use it for server-side rendering.**
51
51
52
52
- The runtime-only build does not include the template compiler, and does not support the `template` option. You can only use the `render` option when using the runtime-only build, but it works with single-file components, because single-file components' templates are pre-compiled into `render` functions during the build step. The runtime-only build is roughly 30% lighter-weight than the standalone build, weighing only 16kb min+gzip.
53
53
54
-
By default, the NPM package exports the standalone build. To use the runtime-only build, add the following alias to your webpack config:
54
+
By default, the NPM package exports the **runtime-only** build. To use the standalone build, add the following alias to your webpack config:
55
55
56
56
```js
57
57
resolve: {
58
58
alias: {
59
-
vue:'vue/dist/vue.common.js'
59
+
vue:'vue/dist/vue.js'
60
60
}
61
61
}
62
62
```
63
63
64
64
For Browserify, you can use [aliasify](https://github.com/benbria/aliasify) to achieve the same.
65
65
66
-
<pclass="tip">Do NOT do `import Vue from 'vue/dist/vue.common.js'` - since some tools or 3rd party libraries may import vue as well, this may cause the app to load both the runtime and standalone builds at the same time and lead to errors.</p>
66
+
<pclass="tip">Do NOT do `import Vue from 'vue/dist/vue.js'` - since some tools or 3rd party libraries may import vue as well, this may cause the app to load both the runtime and standalone builds at the same time and lead to errors.</p>
There are two builds available, the standalone build and the runtime-only build.
106
-
107
-
- The standalone build includes the compiler and supports the `template` option.
108
-
109
-
- The runtime-only build does not include the template compiler, and does not support the `template` option. You can only use the `render` option when using the runtime-only build, but it works with single-file components, because single-file components' templates are pre-compiled into `render` functions during the build step. The runtime-only build is roughly 30% lighter-weight than the standalone build, weighing only 16kb min+gzip.
110
-
111
-
By default, the NPM package exports the standalone build. To use the runtime-only build, add the following alias to your webpack config:
112
-
113
-
```js
114
-
resolve: {
115
-
alias: {
116
-
vue:'vue/dist/vue.common.js'
117
-
}
118
-
}
119
-
```
120
-
121
-
For Browserify, you can use [aliasify](https://github.com/benbria/aliasify) to achieve the same.
122
-
123
-
<pclass="tip">Do NOT do `import Vue from 'vue/dist/vue.common.js'` - since some tools or 3rd party libraries may import vue as well, this may cause the app to load both the runtime and standalone builds at the same time and lead to errors.</p>
0 commit comments