Skip to content

Commit

Permalink
Use file URI in import for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
abrenneke committed Oct 18, 2023
1 parent b2bd69d commit 1cf5d03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/app-executor/bin/executor.mts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ const rivetDebugger = startDebuggerServer({
);
}

const plugin = ((await import(join(pluginDir, packageJson.main))) as { default: RivetPluginInitializer })
.default;
const mainPath = join(pluginDir, packageJson.main);

const plugin = ((await import(`file://${mainPath}`)) as { default: RivetPluginInitializer }).default;

if (typeof plugin !== 'function') {
throw new Error(`Plugin ${spec.id} is not a function`);
Expand Down

0 comments on commit 1cf5d03

Please sign in to comment.