请问 Laravel6 如何引入 VUX?
我试了好几个教程发现总是报错,请会配置的帮忙看看,谢谢
执行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环境)
推荐文章: