Bundler

VuePress has been using Webpackopen in new window as the bundler to dev and build sites. Since VuePress v2, other bundlers are also supported, and now we are using Viteopen in new window as the default bundler. Of course, you can still choose to use Webpack.

Choose a Bundler

When using the vuepressopen in new window package, Vite bundler is installed and used automatically.

If you want to use Webpack bundler instead, you can switch to vuepress-webpackopen in new window package:

yarn remove vuepress
yarn add -D vuepress-webpack@next
1
2
npm uninstall vuepress
npm install -D vuepress-webpack@next
1
2

Bundler Config

Generally, you could use a bundler without extra configuration, because we have already configured them properly to work with VuePress.

Similar to themeConfig, VuePress also allows users to set bundler config via bundlerConfig.

You can refer to Bundlers > Vite and Bundlers > Webpack to check out all options of the corresponding bundler.