Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 7c841ce

Browse files
committed
Imporve addModuleLoader method
1 parent 9723555 commit 7c841ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/aleph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ export class Aleph implements IAleph {
471471

472472
/** add a module loader. */
473473
addModuleLoader(loader: ModuleLoader): void {
474-
if (util.isFunction(loader.resolve) || util.isFunction(loader.load)) {
474+
if (loader.test instanceof RegExp && (util.isFunction(loader.resolve) || util.isFunction(loader.load))) {
475475
if (!this.#loaders.includes(loader)) {
476476
this.#loaders.push(loader)
477477
}

0 commit comments

Comments
 (0)