# Cakephp webpack

**URL:** <https://discourse.cakephp.org/t/cakephp-webpack/11804>\
**Category:** Need Help\
**Created:** [January 13, 2024, 2:19pm UTC](https://discourse.cakephp.org/t/cakephp-webpack/11804 "2024-01-13T14:19:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZenekN](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zenekn/32/2700_2.png) [@ZenekN](https://discourse.cakephp.org/u/ZenekN)\
**Post date:** [January 13, 2024, 2:19pm UTC](https://discourse.cakephp.org/t/cakephp-webpack/11804/1 "2024-01-13T14:19:29Z")

</div>

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

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

```

I would like the development to be in

```auto
app/src/my_app - development
webroot - production

```

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [January 13, 2024, 2:27pm UTC](https://discourse.cakephp.org/t/cakephp-webpack/11804/2 "2024-01-13T14:27:50Z")

</div>

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

I personally use [https://laravel-mix.com/](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.](https://github.com/ishanvyas22/asset-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.

---

<div class="post-metadata">

**Author:** ![ZenekN](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zenekn/32/2700_2.png) [@ZenekN](https://discourse.cakephp.org/u/ZenekN)\
**Post date:** [January 13, 2024, 8:26pm UTC](https://discourse.cakephp.org/t/cakephp-webpack/11804/3 "2024-01-13T20:26:36Z")

</div>

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

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

```
