请问 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环境)

《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 2

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

composer require laravel/ui --dev

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

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

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

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