Cakephp webpack

Which solution should I choose to use webpack. I am installing webpack in the src/my_app location and I would like to output the webpack command to the location indicated in

output: {
path: path.resolve(webroot cakephp)
}

I would like the development to be in

app/src/my_app - development
webroot - production

Since CakePHP doesn’t come preconfigured with webpack I doubt you will find any good answers here.

I personally use https://laravel-mix.com/ which is a wrapper around the most needed webpack features so i can use modern JS and SCSS but that is all configured in JS, not inside CakePHP.

There is also GitHub - ishanvyas22/asset-mix: Provides helpers functions for CakePHP to use Laravel Mix. which makes it even easier to integrate Laravel Mix into Cake but if you want to use Webpack (and its far too complicated config) directly you will have to figure that out yourself or ask that question in a Webpack specific support channel.

Awesome, thanks a lot!
I have a problem , I was getting an error

Unable to locate AssetMix file: /js/app.js.