From 434357cd4a945846afe2d11ba7ebaea43bb065cc Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Thu, 4 Mar 2021 14:48:20 +0800 Subject: [PATCH] docs: update configuration example to import plugin from the main entry --- docs/guide/README.md | 2 +- docs/migrating.md | 2 +- docs/ru/guide/README.md | 4 ++-- docs/ru/migrating.md | 2 +- docs/zh/guide/README.md | 4 ++-- docs/zh/migrating.md | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/guide/README.md b/docs/guide/README.md index 3af08bd39..035f870e6 100644 --- a/docs/guide/README.md +++ b/docs/guide/README.md @@ -26,7 +26,7 @@ Vue Loader's configuration is a bit different from other loaders. In addition to ``` js // webpack.config.js -const VueLoaderPlugin = require('vue-loader/lib/plugin') +const { VueLoaderPlugin } = require('vue-loader') module.exports = { module: { diff --git a/docs/migrating.md b/docs/migrating.md index 73586d5de..3d073f753 100644 --- a/docs/migrating.md +++ b/docs/migrating.md @@ -17,7 +17,7 @@ Vue Loader v15 now requires an accompanying webpack plugin to function properly: ``` js // webpack.config.js -const VueLoaderPlugin = require('vue-loader/lib/plugin') +const { VueLoaderPlugin } = require('vue-loader') module.exports = { // ... diff --git a/docs/ru/guide/README.md b/docs/ru/guide/README.md index 07d33314f..bdcb76b02 100644 --- a/docs/ru/guide/README.md +++ b/docs/ru/guide/README.md @@ -26,7 +26,7 @@ npm install -D vue-loader vue-template-compiler ``` js // webpack.config.js -const VueLoaderPlugin = require('vue-loader/lib/plugin') +const { VueLoaderPlugin } = require('vue-loader') module.exports = { module: { @@ -51,7 +51,7 @@ module.exports = { ``` js // webpack.config.js -const VueLoaderPlugin = require('vue-loader/lib/plugin') +const { VueLoaderPlugin } = require('vue-loader') module.exports = { mode: 'development', diff --git a/docs/ru/migrating.md b/docs/ru/migrating.md index 1eb0e5445..66f820c2a 100644 --- a/docs/ru/migrating.md +++ b/docs/ru/migrating.md @@ -17,7 +17,7 @@ Vue Loader v15 теперь для правильной работы требу ``` js // webpack.config.js -const VueLoaderPlugin = require('vue-loader/lib/plugin') +const { VueLoaderPlugin } = require('vue-loader') module.exports = { // ... diff --git a/docs/zh/guide/README.md b/docs/zh/guide/README.md index 6afd0ba2f..b2796a4af 100644 --- a/docs/zh/guide/README.md +++ b/docs/zh/guide/README.md @@ -26,7 +26,7 @@ Vue Loader 的配置和其它的 loader 不太一样。除了通过一条规则 ``` js // webpack.config.js -const VueLoaderPlugin = require('vue-loader/lib/plugin') +const { VueLoaderPlugin } = require('vue-loader') module.exports = { module: { @@ -51,7 +51,7 @@ module.exports = { ``` js // webpack.config.js -const VueLoaderPlugin = require('vue-loader/lib/plugin') +const { VueLoaderPlugin } = require('vue-loader') module.exports = { mode: 'development', diff --git a/docs/zh/migrating.md b/docs/zh/migrating.md index 3894e835c..3f56b4397 100644 --- a/docs/zh/migrating.md +++ b/docs/zh/migrating.md @@ -17,7 +17,7 @@ Vue Loader v15 现在需要配合一个 webpack 插件才能正确使用: ``` js // webpack.config.js -const VueLoaderPlugin = require('vue-loader/lib/plugin') +const { VueLoaderPlugin } = require('vue-loader') module.exports = { // ...