Admin > Stores > Configuration > Advanced > Developer > Enable
Bundling = Yes
It will create one file with JS files from theme (JS files loaded with RequireJs) and .html knockout templates from web dir, requirejs-config.js.
Be warned, in developer mode it will create the merged js files on each page request, as a result the pages will be very slow.
Also see exclude tag in theme's folder etc/view.xml. Those paths in exclude are not included in the bundled js files because it would be too big. In Magento 2.0, the bundled js was between 7Mb to 10Mb. Magento 2.1 fixed that.
This declaration limits the size of the file:
You should set your store in production mode before enabling bundle JS.