Skip to content

Instantly share code, notes, and snippets.

@egoist
Last active April 16, 2017 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egoist/e3caa03010e16be194c56af7c468edf5 to your computer and use it in GitHub Desktop.
Save egoist/e3caa03010e16be194c56af7c468edf5 to your computer and use it in GitHub Desktop.
Migrate vbuild 6 to 7

CLI

- vbuild --dev
+ vbuild dev

- vbuild --watch
+ vbuild watch

So options.dev does not exist now, use options.mode instead, the possible values are production development test watch

Extend webpack config

options.webpack function still works but is deprecated now, try options.extendWebpack instead:

module.exports = {
  extendWebpack(config) {
    // Disable the progress bar while building
    config.plugins.delete('progress-bar')
  }
}

The config argument is a webpack-chain instance.

ESLint

--eslint option is removed. It's recommended to run standalone eslint bin instead since it's much faster.

Dev server

setup is renamed to setupDevServer:

module.exports = {
  setupDevServer(app) {
    app.get('hello', (req, res) => res.send('hello'))
  }
}

Other

  • run option is removed, nobody uses this except vbuild-karma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment