Handle data: URLs

This commit is contained in:
Alex Gleason committed 2025-09-27 23:15:58 -05:00
1 parent 0b269f78a4
commit 787877d2c7
1 file changed
+7
+7
View File
@@ -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;