diff --git a/docs/en/configurations/custom-blocks.md b/docs/en/configurations/custom-blocks.md index c9ee19831..ffd6013bf 100644 --- a/docs/en/configurations/custom-blocks.md +++ b/docs/en/configurations/custom-blocks.md @@ -4,7 +4,7 @@ You can define custom language blocks inside `*.vue` files. The content of a custom block will be processed by the loaders specified in the `loaders` object of `vue-loader` options and then required by the component module. The configuration is similar to what is described in [Advanced Loader Configuration](../configurations/advanced.md), except the matching uses the tag name instead of the `lang` attribute. -If a matching loader is found for a custom block, it will be processed; otherwise the custom block will simply be ignored. Additionally, if the found loader returns a function, that function will be called with the component of the `*.vue` file as a parameter. +If a matching loader is found for a custom block, it will be processed; otherwise the custom block will simply be ignored. Additionally, if the found loader returns a function, that function will be called with the component of the `*.vue` file as a parameter. ## Single docs file example @@ -49,7 +49,7 @@ module.exports = { rules: [ { test: /\.vue$/, - loader: 'vue', + loader: 'vue-loader', options: { loaders: { // extract all content as raw text @@ -70,9 +70,9 @@ module.exports = { Here's an example of injecting the `` custom blocks into the component so that it's available during runtime. -#### docs-loader.js +#### docs-loader.js -In order for the custom block content to be injected, we'll need a custom loader: +In order for the custom block content to be injected, we'll need a custom loader: ``` js module.exports = function (source, map) { @@ -94,7 +94,7 @@ module.exports = { rules: [ { test: /\.vue$/, - loader: 'vue', + loader: 'vue-loader', options: { loaders: { 'docs': docsLoader @@ -108,7 +108,7 @@ module.exports = { #### component.vue -We are now able to access the `` block's content of imported components during runtime. +We are now able to access the `` block's content of imported components during runtime. ``` html