DEV Community

Discussion on: In programming, is it better to have many small files or one large file?

Collapse
 
matthewbdaly profile image
Matthew Daly

For front end assets. it's straightforward these days to break it down logically into smaller files to work with them more easily, and then during the build process to concatenate them. So you can have many CSS/SCSS and JS files, but only serve one of each in production. That way you can have the best of both worlds.

It's nearly always easier to understand lots of small files for server-side code too, and it's not likely to affect performance.