为了账号安全,请及时绑定邮箱和手机立即绑定

这个是什么原因


ERROR in ./src/app.vue

Module Error (from ./node_modules/vue-loader/lib/index.js):

vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.

 @ ./src/index.js 2:0-27 8:21-24


ERROR in ./src/app.vue?vue&type=template&id=bced26ea&scoped=true 2:0

Module parse failed: Unexpected token (2:0)

You may need an appropriate loader to handle this file type.

> <div>

|     {{msg}}

| </div>

 @ ./src/app.vue 1:0-93 11:2-8 12:2-17

 @ ./src/index.js

npm ERR! code ELIFECYCLE

npm ERR! errno 2

npm ERR! work3@1.0.0 bulid: `webpack --config webpack.config.js`

npm ERR! Exit status 2

npm ERR!

npm ERR! Failed at the work3@1.0.0 bulid script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.


npm ERR! A complete log of this run can be found in:

npm ERR!     D:\nodejs\node_cache\_logs\2018-07-14T06_58_35_698Z-debug.log


正在回答

1 回答

需要配置 plugins

const { VueLoaderPlugin } = require('vue-loader');

// plugins 不在 module 里面配置

module: {

...

},

plugins: [

    new VueLoaderPlugin(),

]

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

这个是什么原因

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信