Open gazben opened 7 years ago
Do you use Webpack 2?
Yes, laravel-mix uses webpack2: https://github.com/JeffreyWay/laravel-mix/blob/master/package.json
The problem is with the spread operator. More info can be found here: #https://github.com/JeffreyWay/laravel-mix/issues/76
Still can't get it to compile, but now we have the exact issue. Is it possible, that during compilation the babelrc is overwritten with the local babelrc?
Try to use import
instead of require
.
If you mean: import "vue-admin/client";
Still gives the error.
.babelrc:
{
"presets": [
["es2015", { "modules": false }]
],
"plugins": ["transform-object-rest-spread"]
}
I spent a lot of time to fix this issue, and I failed. A made the laravel integration without laravel mix. https://github.com/gazben/laravel-vue-admin
@gazben I'm curious to ask why you set up the laravel integration as you did, why all the symlinks?
@tandrus-mc I put way too much time into the integration, and I needed something asap to put in one repository and works. It was a wild idea but it worked.
When I try to use the application for a project a get Unexpected token
Environment:
I include the module to my project:
require('../../../node_modules/vue-admin/client');
Then:
npm run dev
How can I use this project with laravel mix / webpack?