qq_MrMu
2018-05-01 21:29
按老师的步骤往下做,出现如下错误,怎么解决?:
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
ERROR in ./src/App.vue?vue&type=style&index=0&lang=css
Module parse failed: Unexpected character '#' (16:0)
You may need an appropriate loader to handle this file type.
|
|
| #test {
| color: red;
| }
@ ./src/App.vue 4:0-62
@ ./src/index.js
ERROR in ./src/App.vue?vue&type=script&lang=js
Module parse failed: Unexpected keyword 'return' (8:6)
You may need an appropriate loader to handle this file type.
| export default {
| data: {
| return {
| text: 'abc'
| }
@ ./src/App.vue 2:0-54 3:0-49 3:0-49 10:2-8
@ ./src/index.js
ERROR in ./src/App.vue?vue&type=template&id=04c2046b
Module parse failed: Unexpected token (2:0)
You may need an appropriate loader to handle this file type.
|
| <div id="test">{{text}}</div>
|
@ ./src/App.vue 1:0-81 11:2-8 12:2-17
@ ./src/index.js
ERROR in ./src/App.vue
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
@ ./src/index.js 2:0-28 8:21-24
ERROR in ./src/App.vue?vue&type=template&id=04c2046b
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
@ ./src/App.vue 1:0-81 11:2-8 12:2-17
@ ./src/index.js
ERROR in ./src/App.vue?vue&type=script&lang=js
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
@ ./src/App.vue 2:0-54 3:0-49 3:0-49 10:2-8
@ ./src/index.js
ERROR in ./src/App.vue?vue&type=style&index=0&lang=css
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
@ ./src/App.vue 4:0-62
@ ./src/index.js
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! todo_list@1.0.0 build: `webpack --config webpack.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the todo_list@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
是不是webpack 版本问题啊?
解决了这个问题,谢谢提醒!!!!
已安此问提示解决:https://vue-loader.vuejs.org/guide/
Vue+Webpack打造todo应用
84606 学习 · 787 问题
相似问题