Skip to content

docs(webpack): add installation instructions #1035

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

Closed
wants to merge 1 commit into from
Closed
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
31 changes: 31 additions & 0 deletions src/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,37 @@ npm is the recommended installation method when building large scale application
$ npm install vue@next
```

### webpack

Install vue 3 dependencies.

```bash

npm install --save-dev @vue/compiler-sfc vue@next vue-loader@^16.0.0-beta.8
```

Add vue-loader to the module.rules property and add its plugin to the plugins property.

```js
const { VueLoaderPlugin } = require("vue-loader");

module.exports = {
module: {
rules: [
// ...
{
test: /\.vue$/,
use: "vue-loader",
},
]
}
plugins: [
//...
new VueLoaderPlugin(),
]
}
```

## CLI

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.
Expand Down