We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9032a77 commit 153c9e0Copy full SHA for 153c9e0
src/index.ts
@@ -15,6 +15,7 @@ import lodashfp from 'lodash/fp.js';
15
const { get, has } = lodashfp;
16
17
import { loadServerlessConfig } from "./sls-config-parser.js";
18
+import url from 'url';
19
20
class ServerlessOfflineSns {
21
private config: any;
@@ -509,7 +510,7 @@ class ServerlessOfflineSns {
509
510
const handlerPath = fn.handler.substring(0, handlerFnNameIndex);
511
const handlerFnName = fn.handler.substring(handlerFnNameIndex + 1);
512
const fullHandlerPath = resolve(location, handlerPath);
- const handlers = await import(`${fullHandlerPath}.js`);
513
+ const handlers = await import(`${url.pathToFileURL(fullHandlerPath)}.js`);
514
return handlers[handlerFnName];
515
}
516
0 commit comments