Use wildcard server route
Basically, see this example file for info:
https://github.com/me-no-dev/ESPAsyncWebServer/blob/master/examples/regex_patterns/regex_patterns.ino
Linux: ~/.arduino15/packages/espxxxx/hardware/espxxxx/{version}/platform.local.txt
compiler.cpp.extra_flags=-DASYNCWEBSERVER_REGEX=1
Wildcard Server Route for arbitrary static files
server.on("^\\/(.+)$", HTTP_GET, [](AsyncWebServerRequest *request){
String filename = request->pathArg(0);
String suffix = filename.substring(filename.lastIndexOf(".") + 1);
suffix.toLowerCase();
String contentType;
if (suffix == "html") {
contentType ="text/html";
} else if (suffix == "css") {
contentType ="text/css";
} else if (suffix == "js") {
contentType ="text/javascript";
} else if (suffix == "gif") {
contentType ="image/gif";
} else if (suffix == "png") {
contentType ="image/png";
} else if (suffix == "jpg" || suffix == "jpeg") {
contentType ="image/jpeg";
} else {
contentType ="text/plain";
}
request->send(SPIFFS, "/" + filename, contentType);
});