mardi 29 mai 2018

vue-loader 15 with laravel-mix

So i am trying to update my vue-loader in laravel project to version 15.2.1. After updating dependencies and running npm run watch first i get an error that i shoul use VueLoaderPlugin. I added it like official documentation suggests. After trying to run build command again i get this error for each one of my single file components:

Invalid CSS after "...load the styles": expected 1 selector or at-rule, was "var content = requi"

If iam adding this rule to my laravel-mix config

rules: [ { test: /\.vue$/, loader: 'vue-loader' } ]

then compilation runs successfully, but in console i get

[vue warn]: failed to mount component: template or render function not defined.  

I use sass and pug in my vue components with appropriate loaders. Adding more rules to laravel-mix config seems to make no difference. All dependencies are up-to date and work well with vue-loader v.14.2.2. Node.js version is 10.1.0. and npm is 6.1.0.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire