Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import type { Application, RequestHandler } from 'express';
import helmet from 'helmet';
import uaParser from 'ua-parser-js';
import { existsSync, readdirSync, readFileSync } from 'node:fs';
import { pathToFileURL } from 'node:url';
import http from 'node:http';
import { puterClients } from './clients';
import { puterControllers } from './controllers';
Expand Down Expand Up @@ -1022,7 +1023,7 @@ export class PuterServer {
if (entry.isFile()) {
if (/\.(js|mjs|cjs)$/.test(entry.name)) {
console.log(`Importing extension file ${entryPath}`);
await import(entryPath);
await import(pathToFileURL(entryPath).href);
}
continue;
}
Expand Down Expand Up @@ -1059,7 +1060,7 @@ export class PuterServer {
if (!mainPath) continue;

console.log(`Importing extension file ${mainPath}`);
await import(mainPath);
await import(pathToFileURL(mainPath).href);
}
}
}
Expand Down
Loading