Vue.js في السمفونية 4

0

أرغب في استخدام vue.js مع symfony 4. ولكن لدي خطأ عند تشغيل هذا الأمر:

yarn encore dev-server --hot

خطأ:

 ERROR  Failed to compile with 3 errors                                                                                                                                                       20:16:47


 error  in ./assets/js/components/Hello.vue?vue&type=template&id=e8bb2c58

Module parse failed: Unexpected token (2:0)
You may need an appropriate loader to handle this file type.
|
| <div class="hello">
|   <h1>{{ msg }}</h1>
| </div>

 @ ./assets/js/components/Hello.vue 1:0-83 30:4-35:6 30:67-35:5
 @ ./assets/js/App.vue?vue&type=script&lang=js
 @ ./assets/js/App.vue
 @ ./assets/js/main.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./assets/js/main.js

 error  in ./assets/js/App.vue?vue&type=template&id=12494949

Module parse failed: Unexpected token (2:0)
You may need an appropriate loader to handle this file type.
|
| <div id="app">
|   <hello></hello>
| </div>

 @ ./assets/js/App.vue 1:0-81 30:4-35:6 30:65-35:5
 @ ./assets/js/main.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./assets/js/main.js

 error  in ./assets/js/App.vue

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

 @ ./assets/js/main.js 2:0-24
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./assets/js/main.js

أنا لا أفهم لماذا لا يعمل هذا. يمكنني استخدام WAMP كخادم. شكر

1 إجابة

2
افضل جواب
npm install vue-loader vue-template-compiler

أو

yarn add vue-loader vue-template-compiler
:مؤلف

أسئلة ذات صلة

فوق
قائمة طعام