docs: update configuration example to import plugin from the main entry

parent 7af8db40
...@@ -26,7 +26,7 @@ Vue Loader's configuration is a bit different from other loaders. In addition to ...@@ -26,7 +26,7 @@ Vue Loader's configuration is a bit different from other loaders. In addition to
``` js ``` js
// webpack.config.js // webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin') const { VueLoaderPlugin } = require('vue-loader')
module.exports = { module.exports = {
module: { module: {
......
...@@ -17,7 +17,7 @@ Vue Loader v15 now requires an accompanying webpack plugin to function properly: ...@@ -17,7 +17,7 @@ Vue Loader v15 now requires an accompanying webpack plugin to function properly:
``` js ``` js
// webpack.config.js // webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin') const { VueLoaderPlugin } = require('vue-loader')
module.exports = { module.exports = {
// ... // ...
......
...@@ -26,7 +26,7 @@ npm install -D vue-loader vue-template-compiler ...@@ -26,7 +26,7 @@ npm install -D vue-loader vue-template-compiler
``` js ``` js
// webpack.config.js // webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin') const { VueLoaderPlugin } = require('vue-loader')
module.exports = { module.exports = {
module: { module: {
...@@ -51,7 +51,7 @@ module.exports = { ...@@ -51,7 +51,7 @@ module.exports = {
``` js ``` js
// webpack.config.js // webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin') const { VueLoaderPlugin } = require('vue-loader')
module.exports = { module.exports = {
mode: 'development', mode: 'development',
......
...@@ -17,7 +17,7 @@ Vue Loader v15 теперь для правильной работы требу ...@@ -17,7 +17,7 @@ Vue Loader v15 теперь для правильной работы требу
``` js ``` js
// webpack.config.js // webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin') const { VueLoaderPlugin } = require('vue-loader')
module.exports = { module.exports = {
// ... // ...
......
...@@ -26,7 +26,7 @@ Vue Loader 的配置和其它的 loader 不太一样。除了通过一条规则 ...@@ -26,7 +26,7 @@ Vue Loader 的配置和其它的 loader 不太一样。除了通过一条规则
``` js ``` js
// webpack.config.js // webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin') const { VueLoaderPlugin } = require('vue-loader')
module.exports = { module.exports = {
module: { module: {
...@@ -51,7 +51,7 @@ module.exports = { ...@@ -51,7 +51,7 @@ module.exports = {
``` js ``` js
// webpack.config.js // webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin') const { VueLoaderPlugin } = require('vue-loader')
module.exports = { module.exports = {
mode: 'development', mode: 'development',
......
...@@ -17,7 +17,7 @@ Vue Loader v15 现在需要配合一个 webpack 插件才能正确使用: ...@@ -17,7 +17,7 @@ Vue Loader v15 现在需要配合一个 webpack 插件才能正确使用:
``` js ``` js
// webpack.config.js // webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin') const { VueLoaderPlugin } = require('vue-loader')
module.exports = { module.exports = {
// ... // ...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment