Skip to content

Fix typos #810

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 1 commit into from
Feb 12, 2018
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
10 changes: 5 additions & 5 deletions docs/plugin-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ module.exports = (api, projectOptions) => {
// modify webpack config with webpack-chain
})

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

api.regsiterCommand('test', args => {
api.registerCommand('test', args => {
// register `vue-cli-service test`
})
}
Expand All @@ -80,7 +80,7 @@ An important thing to note about env variables is knowing when they are resolved
module.exports = api => {
process.env.NODE_ENV // may not be resolved yet

api.regsiterCommand('build', () => {
api.registerCommand('build', () => {
api.setMode('production')
})
}
Expand All @@ -103,7 +103,7 @@ module.exports = api => {
A plugin can retrieve the resolved webpack config by calling `api.resolveWebpackConfig()`. Every call generates a fresh webpack config which can be further mutated as needed:

``` js
api.regsiterCommand('my-build', args => {
api.registerCommand('my-build', args => {
// make sure to set mode and load env variables
api.setMode('production')

Expand All @@ -117,7 +117,7 @@ api.regsiterCommand('my-build', args => {
Alternatively, a plugin can also obtain a fresh [chainable config](https://github.com/mozilla-neutrino/webpack-chain) by calling `api.resolveChainableWebpackConfig()`:

``` js
api.regsiterCommand('my-build', args => {
api.registerCommand('my-build', args => {
api.setMode('production')

const configA = api.resolveChainableWebpackConfig()
Expand Down