# Webpack config watch hohe CPU last

**URL:** <https://forum.shopware.com/t/webpack-config-watch-hohe-cpu-last/60504>\
**Category:** Allgemein\
**Created:** [18. Juli 2019 um 08:42 UTC](https://forum.shopware.com/t/webpack-config-watch-hohe-cpu-last/60504 "2019-07-18T08:42:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [18. Juli 2019 um 08:42 UTC](https://forum.shopware.com/t/webpack-config-watch-hohe-cpu-last/60504/1 "2019-07-18T08:42:43Z")

</div>

Aktuell ist es so, dass der watcher teilweise eine sehr hohe CPU Last verursacht.

Viele berichten, dass man die CPU Last extrem drücken kann von bspw. 100 auf 5% oder derglichen, indem man den node\_modules Folder in die ignore packt für den watcher:

[https://webpack.js.org/configuration/watch/#watchoptionsignored](https://webpack.js.org/configuration/watch/#watchoptionsignored)

[https://twitter.com/stidges/status/1148560869913178112](https://twitter.com/stidges/status/1148560869913178112)

Allerdings blicke ich da bei den webpack configs noch nicht ganz durch und wo der watcher ist. Vielleicht könnt Ihr euch das mal anschauen @Jens\_K‍ [@Moritz Naczenski]([http://forum.shopware.com/profile/14574/Moritz](http://forum.shopware.com/profile/14574/Moritz) Naczenski “Moritz Naczenski”)‍ ? 🙂

---

<div class="post-metadata">

**Author:** ![rammi22](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rammi22](https://forum.shopware.com/u/rammi22)\
**Post date:** [7. August 2022 um 13:47 UTC](https://forum.shopware.com/t/webpack-config-watch-hohe-cpu-last/60504/2 "2022-08-07T13:47:48Z")

</div>

Hallo,

Version: Shopware 6.4.14.0

da es keine Antwort zu dem Thema gibt und ich kein neuen Thread eröffnen möchte, nutze ich diesen hier. Mein Anliegen ist ähnlich geartet.

Ich entwickle im [Docker-Container von Shopware](https://developer.shopware.com/docs/guides/installation/docker) unter `Ubuntu 20.04` als Host und mit dem watcher `./ps.phar administration:watch` .

Abgesehen von der echt fehlenden Performance bekomme ich seit einiger Zeit jede Menge Fehlermeldungen, z.Bsp:

> Error from chokidar (/app/vendor/shopware/platform/src/Administration/Resources/app/administration/src/module/sw-settings-search/component/sw-settings-search-live-search-keyword): Error: ENOSPC: System limit for number of file watchers reached, watch ‚/app/vendor/shopware/platform/src/Administration/Resources/app/administration/src/module/sw-settings-search/component/sw-settings-search-live-search-keyword/sw-settings-search-live-search-keyword.html.twig‘

Eigentlich will ich weder im `vendor` noch in den `node_modulen` Dateien beobachten, sondern nur die des eigenen Plugin.

Ich habe keine Doku bei Shopware gefunden, wie man das konfiguriert:

- `vendor` & `node_modules` ausschließen
- nur Dateien des zu entwickelnden Plugin beobachten

Kann da jemand Hilfe leisten?

VG

---

<div class="post-metadata">

**Author:** ![rammi22](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rammi22](https://forum.shopware.com/u/rammi22)\
**Post date:** [7. August 2022 um 14:45 UTC](https://forum.shopware.com/t/webpack-config-watch-hohe-cpu-last/60504/3 "2022-08-07T14:45:57Z")

</div>

Bislang gefunden:

- [ExtendingWebpack](https://developer.shopware.com/docs/guides/plugins/plugins/administration/extending-webpack)
- [Webpack-`watchOptions.ignored`](https://webpack.js.org/configuration/watch/#watchoptionsignored)

Nach o.g. Anleitung Webpack erweitert:

```auto
// custom/plugin/MyPlugin/src/Resources/app/administration/build/webpack.config.js
const path = require('path');

module.exports = () => {
    return {
        resolve: {
         watchOptions: {
             ignored: [path.posix.resolve(__dirname, './../../../../../../../../vendor')]
         }
    };
};

```

Damit erwarte ich das der **gesamte `vendor`-Ordner vom `watch` ausgeschlossen wird**.

Webpack wird geladen

```auto
...
        # Plugin "Storefront": Injected successfully
        # Plugin "SwagExtensionStore": Injected successfully
        # Plugin "MyPlugin": Injected successfully
        
        # Plugin "SwagExtensionStore": Extends the webpack config successfully
        # Plugin "MyPlugin": Extends the webpack config successfully
...

```

Aktuell greift die `webpack.config.js` nicht. Irgendwelche Empfehlungen?
