qmldir files are used to designate types as a singleton (in addition to having a pragma Singleton statement inside the qml type).
qmldir files are not loaded automatically even if they exist in the same directory as the qml file. If all types are fully resolved without this, implicit loading does not happen. In those cases, if you need to use QML singletons you must add an explicit import.
This may result in a lot of import "." statements.
For example see the the SameGame modifications in patch https://codereview.qt-project.org/c/qt/qtdeclarative/+/69429
Ideal fix would be to deduct when a QML Singleton is used and then drop the requirement for having the singleton also defined in the qmldir file. This may be possible in the future v4 compiler.