mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Fix json import.
This commit is contained in:
1 parent
ca334d7585
commit
6f17774309
1 file changed
+2
-2
@@ -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<string> {
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user