In a static website, I want to serve single JS and CSS file instead of making multiple HTTP requests.
1. Lets say I have 3 JS file as below:
jquery.js
bootstrap.js
blog.js
I want to bundle into one bundle home.bundle.js and it should bundled in correct order.
2. Lets say I have 3 CSS file as below:
font-awesome.css
bootstrap.css
style.css
I want to bundle into one bundle home.bundle.css and it should be bundled in correct order.
For many hours I have tried this using webpack and parceljs but ran into many issues.
-
webpackis not bundling in order , some plugins are deprecated. -
parceljsis adding some extrarequireJScode in the bundle and gives runtime error in console.
Any simple way to do this ?
Any help will be appreciated.






Why webpack isn't bundling??
I think that you should give it a try and there a lot of plugins & configurations that can help you reach the wanted result.