Back

Laravel 5.4 ES6 compilation in laravel-mix


Hi, I use mix.react to make my js file

I'd like to use ES6 syntax like {...object} etc but laravel-mix based on babel-preset-react package where dossn't support ES6.

I've tried add modules and in .babelrc

  "presets": ["env","es2016","react"]
}```

i have no idea how to configure it together with laravel-mix. 
PauLeKZ1 replied 2 months ago

Do you have a custom babel rc file in your root folder or are you editing the presets in the node modules?

jaroslawziolkowski replied 2 months ago

I have custom .baberc file it make no sense to change in node_modules


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us