From 9e49794ac80da2993d31bbdd327751c517f1dba3 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Fri, 27 Feb 2026 16:08:31 +0100 Subject: [PATCH] Remove file:// Deno-ism from plug compiler - Drop file:// URL prefix from generated plug imports; use plain absolute paths instead (esbuild resolves these natively) - Remove the file-url-resolver esbuild plugin that was only needed to strip that prefix --- client/plugos/plug_compile.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/client/plugos/plug_compile.ts b/client/plugos/plug_compile.ts index ddc60463..bed6d194 100644 --- a/client/plugos/plug_compile.ts +++ b/client/plugos/plug_compile.ts @@ -72,7 +72,7 @@ ${ // Resolve path filePath = path.join(rootPath, filePath); - return `import {${jsFunctionName} as ${funcName}} from "file://${ + return `import {${jsFunctionName} as ${funcName}} from "${ // Replacing \ with / for Windows path.resolve(filePath).replaceAll( "\\", @@ -119,18 +119,6 @@ setupMessageListener(functionMapping, manifest, self.postMessage); outfile: outFile, metafile: options.info, treeShaking: true, - plugins: [ - // Simple plugin to handle file:// URLs - { - name: "file-url-resolver", - setup(build: esbuild.PluginBuild) { - build.onResolve({ filter: /^file:\/\// }, (args: esbuild.OnResolveArgs) => { - const filePath = args.path.replace(/^file:\/\//, ""); - return { path: filePath }; - }); - }, - }, - ], }); if (options.info) {