-
Notifications
You must be signed in to change notification settings - Fork 138
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
The one thing needed in at least the simpler examples (that I noticed) is to change require.resolve('./workflows.ts')
in worker.ts to new URL("./workflows.ts", import.meta.url).pathname
example line: https://github.com/temporalio/samples-typescript/blob/main/hello-world/src/worker.ts#L21
Describe the solution you'd like
Maybe a comment in the code showing the esm solution? (genuinely not sure if this is best solution or not though here)
// Workflows are registered using a path as they run in a separate JS context.
workflowsPath: require.resolve('./workflows'),
// or if using esm:
// workflowsPath: new URL("./workflows.ts", import.meta.url).pathname
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request