Skip to content

Commit

Permalink
Support tsx actors
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia committed Oct 20, 2024
1 parent 693a889 commit 73db5a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/actors/server/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ if (import.meta.main) {

// dynamically import all actors in the actors folder.
for await (const dirEntry of Deno.readDir(actorsFolder)) {
if (dirEntry.isFile && dirEntry.name.endsWith(".ts")) {
if (
dirEntry.isFile && dirEntry.name.endsWith(".ts") ||
dirEntry.name.endsWith(".tsx")
) {
const actor = await import(join(actorsFolder, dirEntry.name));
if (actor.default) {
actors.push(actor.default);
Expand Down

0 comments on commit 73db5a9

Please sign in to comment.