diff --git a/docs/config/README.md b/docs/config/README.md index 9422b0c2e3..129c0da6b6 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -168,6 +168,23 @@ module.exports = { } ``` +#### Adding a new loader example + +``` js +// vue.config.js +module.exports = { + chainWebpack: config => { + // GraphQL Loader + config.module + .rule('graphql') + .test(/\.graphql$/) + .use('graphql-tag/loader') + .loader('graphql-tag/loader') + .end() + } +} +``` + #### 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: