When using AdminJS with CommonJS projects (like NestJS), the only way I could have custom React components working has been by putting them into .mjs files (this unfortunately loses typing as TypeScript doesn't support .mtsx, but that's how it is...)
Currently, ComponentLoader doesn't allow this file extension, but I don't think there is any problem by allowing them? It worked for me at least, so here is the change :)
When using AdminJS with CommonJS projects (like NestJS), the only way I could have custom React components working has been by putting them into
.mjs
files (this unfortunately loses typing as TypeScript doesn't support.mtsx
, but that's how it is...)Currently,
ComponentLoader
doesn't allow this file extension, but I don't think there is any problem by allowing them? It worked for me at least, so here is the change :)