Skip to content

Add the browser option in package.json #607

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 2 commits into from
Nov 24, 2016
Merged
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
8 changes: 7 additions & 1 deletion src/v2/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ resolve: {
}
```

For Browserify, you can use [aliasify](https://github.com/benbria/aliasify) to achieve the same.
For Browserify, you can add an alias to your package.json:

``` js
"browser": {
"vue": "vue/dist/vue.common"
},
```

<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>

Expand Down