loading...

Discussion on: How to bundle mutiple JS and CSS files into single bundle ?

Collapse
sidvishnoi profile image
Sid Vishnoi

If you want only to bundle them together, you can simply concatenate them instead of using the heavy and modern JS tools.

$ cat font-awesome.css bootstrap.css style.css > home.bundle.css
$ cat jquery.js bootstrap.js blog.js > home.bundle.js

If you're on Windows, replace cat by type.

Collapse
shaijut profile image
Shaiju T Author

Thanks, yes offcourse I just want concatenate them. But just curious to know that's how bundling works isn't? Also I am using Windows, should I install any CLI to make cat or type work ?

Collapse
feichinger profile image
FJones

This. Replace with gulp and gulp-concat if you need more than just combining.

Collapse
shaijut profile image
Shaiju T Author

I was looking for simple tools like this one. But when I Google JavaScript bundle all I get was webpack or parceljs options. Thanks for simple solution. Appreciate :)