The document is only used for theme display, please go to the official site for the latest Vuepress documentation
Webpack
Options
Reference of webpack bundler config, which can be set via bundlerConfig.
configureWebpack
Type:
(config: WebpackConfiguration, isServer: boolean, isBuild: boolean) => WebpackConfigurationDetails:
Edit the internal webpack config.
This option accepts a function that will receive a webpack config object as the 1st argument, an
isServerflag as the 2nd argument and anisBuildflag 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) => voidDetails:
Edit the internal webpack config with webpack-chainopen in new window.
This option accepts a function that will receive a
Configinstance that provided bywebpack-chainas the 1st argument anisServerflag as the 2nd argument and anisBuildflag as the 3rd argument.
beforeDevServer
Type:
(server: WebpackDevServer) => voidDetails:
A hook to be called in
devServer.beforeof webpack.The arguments of the function are the first two arguments of
devServer.before.Also see:
afterDevServer
Type:
(server: WebpackDevServer) => voidDetails:
A hook to be called in
devServer.afterof webpack.The arguments of the function are the first two arguments of
devServer.after.Also see:
vue
Type:
VueLoaderOptionsDetails:
Options for
vue-loader.Also see:
postcss
Type:
PostcssLoaderOptionsDetails:
Options for
postcss-loader.Also see:
stylus
Type:
StylusLoaderOptionsDetails:
Options for
stylus-loader.Also see:
scss
Type:
SassLoaderOptionsDetails:
Options for
sass-loaderfor.scssfiles.Also see:
sass
Type:
SassLoaderOptionsDetails:
Options for
sass-loaderfor.sassfiles.Also see:
less
Type:
LessLoaderOptionsDetails:
Options for
less-loader.Also see:
evergreen
Type:
booleanDefault:
trueDetails:
Set to
trueif you are only targeting evergreen browsers. This will disable some transpilation and polyfills, and result in faster builds and smaller files.