Composer allows us to optimize the autoloader using the --optimize flag or shortly -o.
@@ -45,6 +45,7 @@
},
"config": {
"preferred-install": "dist",
- "sort-packages": true
+ "sort-packages": true,
+ "optimize-autoloader": true
}