How to optimize the project require.js?

Good day!

Working on an old and quite large project, around 500 scripts, all loaded via require.js individually, respectively, the loading time of the website is extremely decent.

When the load is connected in practically all scripts, so I want to have a single js file with no duplicates and other garbage.
Clear the start module is there, the script require, it is the first config and script main.js connect to the html page:
script.setAttribute("data-main", "/require-config.js?c=" +;
script.onreadystatechange = script.onload = function (){
 script.setAttribute("src", "main.js");
script.setAttribute("src", "/lib/requirejs/require.js");

How to optimize require.js app, collect all the scripts (which are loaded during boot of the site) in one file and not lose the async loading of the other files?
July 9th 19 at 13:27
1 answer
July 9th 19 at 13:29
webpack + async-loader for it.
I use webpack in new projects and to rewrite the require is not ready, though very desirable) - Sydney.Durg commented on July 9th 19 at 13:32

Find more questions by tags AMDGulp.jsJavaScriptRequireJS