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) => 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 anisBuild
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 bywebpack-chain
as the 1st argument anisServer
flag as the 2nd argument and anisBuild
flag as the 3rd argument.
beforeDevServer
Type:
(server: WebpackDevServer) => void
Details:
A hook to be called in
devServer.before
of webpack.The arguments of the function are the first two arguments of
devServer.before
.Also see:
afterDevServer
Type:
(server: WebpackDevServer) => void
Details:
A hook to be called in
devServer.after
of webpack.The arguments of the function are the first two arguments of
devServer.after
.Also see:
vue
Type:
VueLoaderOptions
Details:
Options for
vue-loader
.Also see:
postcss
Type:
PostcssLoaderOptions
Details:
Options for
postcss-loader
.Also see:
stylus
Type:
StylusLoaderOptions
Details:
Options for
stylus-loader
.Also see:
scss
Type:
SassLoaderOptions
Details:
Options for
sass-loader
for.scss
files.Also see:
sass
Type:
SassLoaderOptions
Details:
Options for
sass-loader
for.sass
files.Also see:
less
Type:
LessLoaderOptions
Details:
Options for
less-loader
.Also see:
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.