diff --git a/docs/webpack.md b/docs/webpack.md index fc36a41da9..fe9444cc6f 100644 --- a/docs/webpack.md +++ b/docs/webpack.md @@ -77,6 +77,21 @@ module.exports = { } ``` +#### Replace existing Base Loader + +If you want to replace an existing [Base Loader](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js), for example using `vue-svg-loader` to inline SVG files instead of loading the file: + +``` js +// vue.config.js +module.exports = { + chainWebpack: config => { + config.module + .rule('svg') + .use('file-loader') + .loader('vue-svg-loader') + } +} +``` #### Modifying Plugin Options