请问 Laravel6 如何引入 VUX?

我试了好几个教程发现总是报错,请会配置的帮忙看看,谢谢:smiley:
执行yarn run dev时的错误代码:

ERROR in ./resources/js/components/ExampleComponent.vue 3:0
Module parse failed: Unexpected token (3:0)
File was processed with these loaders:
 * ./node_modules/vux-loader/src/index.js
 * ./node_modules/vue-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| import { render, staticRenderFns } from "./ExampleComponent.vue?vue&type=template&id=299e239e&"
| import script from "./ExampleComponent.vue?vue&type=script&lang=js&"
> ../../../node_modules/vux-loader/src/script-loader.js!export * from "./ExampleComponent.vue?vue&type=script&lang=js&"
| 
| 
 @ ./resources/js/app.js 19:35-79
 @ multi ./resources/js/app.js ./resources/sass/app.scss
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the @ development 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!     /home/vagrant/.npm/_logs/2020-03-16T04_15_55_765Z-debug.log
error Command failed with exit code 2.

我参考的教程链接:
Laravel 6.X + Vue.js 2.X + Element UI +vue-router 配置
laravel5.5+vue2.5+element+vux
laravel项目搭建初步配置——(Laravel+Vue+Element-ui+Vux环境)

《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
讨论数量: 2

从6.x起,vue依赖需要自行安装,你可以能是没有安装脚手架或依赖,参考文档:前端脚手架《Laravel 7 中文文档》 依次执行:

composer require laravel/ui --dev

php artisan ui vue
5年前 评论
firstsight (楼主) 5年前

截图看一下resources/js/components/ExampleComponent.vue

5年前 评论
firstsight (楼主) 5年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!