refactor: use browser-compatible csv-parse entry point
Update the `csv-parse` import to use the browser ESM sync version and remove unused `fs` and `path` imports in `loader.ts`.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { parse } from "csv-parse/sync";
|
import { parse } from "csv-parse/browser/esm/sync";
|
||||||
import {
|
import {
|
||||||
parseSchema,
|
parseSchema,
|
||||||
createValidator,
|
createValidator,
|
||||||
@@ -34,8 +34,6 @@ import {
|
|||||||
} from "./reference-resolver.js";
|
} from "./reference-resolver.js";
|
||||||
import { generateTypeDefinition } from "./type-gen.js";
|
import { generateTypeDefinition } from "./type-gen.js";
|
||||||
import { csvToModule } from "./module-gen.js";
|
import { csvToModule } from "./module-gen.js";
|
||||||
import * as fs from "fs";
|
|
||||||
import * as path from "path";
|
|
||||||
import {
|
import {
|
||||||
parseTypeDeclaration,
|
parseTypeDeclaration,
|
||||||
parseReverseReferenceDeclaration,
|
parseReverseReferenceDeclaration,
|
||||||
|
|||||||
Reference in New Issue
Block a user