Possible to have C5 ignore subdirectory of theme? [node_modules]

Permalink
Hello all,

I'm currently building out a site in Concrete5 but I ran into a C5 performance issue when using NPM within a theme folder. I have roughly 5 pacakges installed through npm (roughly 70mb). What I noticed is after node_modules is created and everything is installed, load times site-wide go from 1-2 seconds to 20+ seconds per page, no matter the page.

Upon removing node_modules, the page load speeds go back to normal, so I believe it may be an issue with Concrete5 trying to parse the node_modules folder.

Is there any way to prevent this behavior entirely (other than moving node_modules outside of the theme)?

Thanks!

 
geertvdtol replied on at Permalink Reply
Same thing for me. I have node_modules in my theme folder. Concrete5 reads all content of the themes folder (to check for overrides?). But I even get an exception here: \concrete\src\Foundation\Environment.php

When I remove the node_modules folder everything is fine.

To fix this I tried to override the Concrete\Core\Foundation\Environment class in application/bootstrap/app.php. But application/bootstrap/app.php is run after C5 reads the content of the theme folder.

Is there a way to fix this?

Thanks!