From 6f17774309572e21163856d65be1980b3c8cabc8 Mon Sep 17 00:00:00 2001 From: Chad Curtis Date: Fri, 26 Sep 2025 22:47:57 +0000 Subject: [PATCH] Fix json import. --- src/lib/build/fsPlugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/build/fsPlugin.ts b/src/lib/build/fsPlugin.ts index 5e914752..893517f3 100644 --- a/src/lib/build/fsPlugin.ts +++ b/src/lib/build/fsPlugin.ts @@ -38,7 +38,7 @@ export function fsPlugin(fs: JSRuntimeFS, cwd: string): Plugin { async (args) => { const ext = path.extname(args.path).slice(1); - if (!["ts", "tsx", "js", "jsx", "css"].includes(ext)) { + if (!["ts", "tsx", "js", "jsx", "css", "json"].includes(ext)) { return; } @@ -56,7 +56,7 @@ async function tryFileVariants( fs: JSRuntimeFS, basePath: string, ): Promise { - const extensions = [".ts", ".tsx", ".js", ".jsx", ".css"]; + const extensions = [".ts", ".tsx", ".js", ".jsx", ".css", ".json"]; const stat = await statSafe(fs, basePath); // If it's a file, check if it exists