mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
fix(sdk-playground): the Vite config loads on Node 22 before 22.18 (#7805)
vite.config.ts imported createFsAdapter from @hyperframes/sdk/adapters/fs. Vite leaves a bare import in a config file to Node, and that export points at src/adapters/fs.ts, so Node had to load a .ts file itself. Node only does that without a flag from 22.18, and on 22.0 to 22.17 build, dev and test all stopped with ERR_UNKNOWN_FILE_EXTENSION, which also failed the last step of the root build. The config now imports the adapter by its relative source path, which Vite bundles with the config on every Node version. Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
ec5a4e2a10
commit
c7876f3330
@@ -3,7 +3,7 @@ import path from "node:path";
|
||||
import type { Plugin } from "vite";
|
||||
import type { Connect } from "vite";
|
||||
import type { ServerResponse } from "node:http";
|
||||
import { createFsAdapter } from "@hyperframes/sdk/adapters/fs";
|
||||
import { createFsAdapter } from "../sdk/src/adapters/fs";
|
||||
import type { PersistAdapter } from "@hyperframes/sdk";
|
||||
|
||||
const COMP_ROOT = path.resolve(import.meta.dirname);
|
||||
|
||||
Reference in New Issue
Block a user