Webpack

@vuepress/bundler-webpack

Options

Reference of webpack bundler config, which can be set via bundlerConfig.

configureWebpack

  • Type: (config: WebpackConfiguration, isServer: boolean, isBuild: boolean) => WebpackConfiguration

  • Details:

    Edit the internal webpack config.

    This option accepts a function that will receive a webpack config object as the 1st argument, an isServer flag as the 2nd argument and an isBuild flag as the 3rd argument. You can either mutate the config directly, or return an object to be merged by webpack-mergeopen in new window.

chainWebpack

  • Type: (config: WebpackChainConfig, isServer: boolean, isBuild: boolean) => void

  • Details:

    Edit the internal webpack config with webpack-chainopen in new window.

    This option accepts a function that will receive a Config instance that provided by webpack-chain as the 1st argument an isServer flag as the 2nd argument and an isBuild flag as the 3rd argument.

beforeDevServer

afterDevServer

vue

postcss

stylus

scss

sass

less

evergreen

  • Type: boolean

  • Default: true

  • Details:

    Set to true if you are only targeting evergreen browsers. This will disable some transpilation and polyfills, and result in faster builds and smaller files.