2026-03-31 14:55:46 +08:00
|
|
|
import { LoaderContext } from '@rspack/core';
|
|
|
|
|
|
|
|
|
|
interface CsvLoaderOptions {
|
|
|
|
|
delimiter?: string;
|
|
|
|
|
quote?: string;
|
|
|
|
|
escape?: string;
|
|
|
|
|
bom?: boolean;
|
|
|
|
|
comment?: string | false;
|
|
|
|
|
trim?: boolean;
|
2026-03-31 15:49:05 +08:00
|
|
|
/** Generate TypeScript declaration file (.d.ts) */
|
|
|
|
|
emitTypes?: boolean;
|
|
|
|
|
/** Output directory for generated type files (relative to output path) */
|
|
|
|
|
typesOutputDir?: string;
|
2026-03-31 14:55:46 +08:00
|
|
|
}
|
|
|
|
|
declare function csvLoader(this: LoaderContext<CsvLoaderOptions>, content: string): string | Buffer;
|
|
|
|
|
|
|
|
|
|
export { type CsvLoaderOptions, csvLoader as default };
|