Skip to content

Commit

Permalink
docs: basic instructions on modifying webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 30, 2018
1 parent 4fb4e35 commit 27c4bc3
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,32 @@ yarn global add @vue/cli-init
vue init webpack my-project
```

### Customization and Plugin Usage
### Customizing Webpack Config

Create a `vue.config.js` in project root: (**Note:** if you have a `vue` field in your `package.json`, you need to move that here as well)

``` js
// vue.config.js
module.exports = {
chainWebpack: chainableConfig => {
// modify config with webpack-chain
// https://github.com/mozilla-neutrino/webpack-chain
},

configureWebpack: config => {
// mutate config directly, or return new config
},

// object literal will be merged into base config using webpack-merge
configureWebpack: {
// ...
}
}
```

### Recipes and Plugin Usage

For a detailed guide on how to customize a project, recipes for common tasks, detailed usage for each plugin, please see the [full documentation](https://github.com/vuejs/vue-cli/blob/dev/docs/README.md).
For a detailed guide with recipes for common tasks, detailed usage for each plugin, please see the [full documentation](https://github.com/vuejs/vue-cli/blob/dev/docs/README.md).

## Contributing

Expand Down

0 comments on commit 27c4bc3

Please sign in to comment.