Mmh I think it's only possible when you define an entry per directory. However you might be able to use a more wildcardish approach.
Maybe this can help you: https://medium.com/trabe/multiple-css-bundles-with-webpack-75f263095f09
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi there,
i've been searching on google but i cant find the solution i'm looking for.
My app will run on the http/2 protocol, so i would like to have multiple css files. My goal is that only the css that is needed should be loaded, depending on what site type the user is on.
Now... i don't want to add every resource manually to my webpack config file.
Is their a way to setup webpack that it will search for all files in a folder (and subfolders) and output them to single files?
my folder structure:
frontend
- app.scss
-- pages
---_city.scss
---_dashboard.scss
---_post.scss
--modules
---_forms.scss
---_navigation.scss
my output that i want:
.../app.css
.../city.css
.../dashboard.css
.../post.css
.../forms.css
.../navigation.css
THANKS :)
Please or to participate in this conversation.