From 787877d2c750f1c280547144b960a5f5db7912b4 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 27 Sep 2025 23:15:58 -0500 Subject: [PATCH] Handle `data:` URLs --- src/lib/build/fsPlugin.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/build/fsPlugin.ts b/src/lib/build/fsPlugin.ts index 7d35b0eb..cb53dd4e 100644 --- a/src/lib/build/fsPlugin.ts +++ b/src/lib/build/fsPlugin.ts @@ -8,6 +8,13 @@ export function fsPlugin(fs: JSRuntimeFS, cwd: string): Plugin { name: "fs", setup(build) { + build.onResolve({ filter: /^data:/ }, (args) => { + return { + path: args.path, + external: true, + }; + }); + build.onResolve({ filter: /.*/ }, async (args) => { let resolved: string;