8000 Add the browser option in package.json (#607) · rubythonode/vuejs.org@75d9345 · GitHub
[go: up one dir, main page]

Skip to content

Commit 75d9345

Browse files
CoolGoosechrisvfritz
authored andcommitted
Add the browser option in package.json (vuejs#607)
* Add the browser option in package.json Works faster and better than aliasify and it's the default used in the vuejs browserify template * Tweak browserify alias instructions
1 parent 2828ae7 commit 75d9345

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/v2/guide/installation.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,13 @@ resolve: {
6464
}
6565
```
6666

67-
For Browserify, you can use [aliasify](https://github.com/benbria/aliasify) to achieve the same.
67+
For Browserify, you can add an alias to your package.json:
68+
69+
``` js
70+
"browser": {
71+
"vue": "vue/dist/vue.common"
72+
},
73+
```
6874

6975
<p class="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>
7076

0 commit comments

Comments
 (0)
0