From 1cf5d03611eb9ac3b48dda335f307d81aa9a5a7f Mon Sep 17 00:00:00 2001 From: Andy Brenneke Date: Wed, 18 Oct 2023 10:42:13 -0700 Subject: [PATCH] Use file URI in import for windows --- packages/app-executor/bin/executor.mts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/app-executor/bin/executor.mts b/packages/app-executor/bin/executor.mts index 996de99b2..28941bd8d 100644 --- a/packages/app-executor/bin/executor.mts +++ b/packages/app-executor/bin/executor.mts @@ -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`);