title: Upgrade Laravel Mix to Use Babel 7
body: <p>I need to update Laravel mix to use Babel 7.</p>
  
  <p>I update my dependencies to use Laravel Mix 4.0.7 that should support Babel 7.</p>
  
  <pre><code>  "devDependencies": {
      "@babel/core": "^7.2.2",
      "@babel/plugin-proposal-class-properties": "^7.2.1",
      "@babel/preset-env": "^7.2.0",
      "@babel/preset-react": "^7.0.0",
      "axios": "^0.15.3",
      "babel-loader": "^7.1.5",
      "bootstrap": "4.1.3",
      "browser-sync": "^2.26.3",
      "browser-sync-webpack-plugin": "^2.0.1",
      "jquery": "^3.1.1",
      "laravel-mix": "^4.0.7",
      "less": "^3.9.0",
      "less-loader": "^4.1.0",
      "lodash": "^4.17.10",
      "react-color": "^2.14.1",
      "resolve-url-loader": "^2.3.1",
      "sass": "^1.15.2",
      "sass-loader": "^7.1.0",
      "styled-components": "^4.0.3",
      "vue": "^2.5.13"
    }
  </code></pre>
  
  <p>And in my .babelrc file i have:</p>
  
  <pre><code>{
    "loader": "babel-loader",
    "presets": ["@babel/preset-env", "@babel/preset-react"],
    "plugins": [
      "@babel/plugin-proposal-object-rest-spread",
      "@babel/plugin-proposal-class-properties",
      "@babel/plugin-transform-react-jsx"
    ]
  }
  </code></pre>
  
  <p>And in my webpack.mix.js i have:</p>
  
  <pre><code>mix.react("resources/assets/app.js", "public/js");
  </code></pre>
  
  <p>The problem is when i run npm run watch i get the following error:</p>
  
  <p><strong>Module build failed (from ./node_modules/babel-loader/lib/index.js):
  Error: Cannot find module 'babel-core'</strong></p>
  
  <p>Apparently, Laravel Mix is trying to use babel-core instead of @babel/core.</p>
  
  <p>Any ideas on how to solve this?</p>