Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 30, 2017
1 parent e9e237e commit d18de35
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,14 @@ A plugin should export a function which receives two arguments:
The API allows plugins to extend/modify the internal webpack config for different environments and inject additional commands to `vue-cli-service`. Example:

``` js
module.exports = (api, options) => {
api.configureWepback(config => {
module.exports = (api, projectOptions) => {
api.chainWebpack(webpackConfig => {
// modify webpack config with webpack-chain
})

api.configureWepback(webpackConfig => {
// modify webpack config
// or return object to be merged with webpack-merge
})

api.regsiterCommand('test', args => {
Expand All @@ -78,7 +83,7 @@ module.exports = (api, options) => {
}
})

api.renderFiles('./files')
api.render('./template')
}
```

Expand Down

0 comments on commit d18de35

Please sign in to comment.