Permalink
Browse files

Bump to Mix v4

  • Loading branch information...
JeffreyWay committed Dec 14, 2018
1 parent bc435e7 commit dc58f95ebbf15b8902ccaef4e2aaa6b0ecbb0e96
Showing with 11 additions and 6 deletions.
  1. +4 −1 package.json
  2. +4 −2 public/css/app.css
  3. +1 −1 public/js/app.js
  4. +2 −2 resources/js/app.js
@@ -14,9 +14,12 @@
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^2.0",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue": "^2.5.17"
}
}

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -18,9 +18,9 @@ window.Vue = require('vue');
*/

// const files = require.context('./', true, /\.vue$/i)
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key)))
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))

Vue.component('example-component', require('./components/ExampleComponent.vue'));
Vue.component('example-component', require('./components/ExampleComponent.vue').default);

/**
* Next, we will create a fresh Vue application instance and attach it to

3 comments on commit dc58f95

@ereztdev

This comment has been minimized.

Copy link

ereztdev replied Dec 15, 2018

Was this tested out with npm run dev ?
peer-dependency error occurs due to change to laravel-mix's version coming from a dep. issue with vue-loader.
My app has multiple components yet even when reverting back to a single ExampleComponent , this error remains.

ERROR in ./resources/js/components/ExampleComponent.vue
Module build failed (from ./node_modules/vue-loader/lib/index.js):
Error: [vue-loader] vue-template-compiler must be installed as a peer dependency, or a compatible compiler implementation must be passed via options.
    at loadTemplateCompiler (C:\project\node_modules\vue-loader\lib\index.js:21:11)
    at Object.module.exports (C:\project\node_modules\vue-loader\lib\index.js:65:35)
 @ ./resources/js/app.js 15:35-79
 @ multi ./resources/js/app.js ./resources/sass/app.scss
@JeffreyWay

This comment has been minimized.

Copy link
Contributor

JeffreyWay replied Dec 15, 2018

@ereztdev Yep, you can see the compiled files above.

You likely have a vue and vue-template-compiler version mismatch in your project. Both of those dependencies need to be the exact same version. Try doing npm update vue.

@ereztdev

This comment has been minimized.

Copy link

ereztdev replied Dec 15, 2018

deleting node-modules & package-lock.json completely and re-installing did the trick.
It was on vue 2.5.7.
Thanks and removing issue.

Please sign in to comment.