config.d.mts 1.0 KB

1234567891011121314151617181920212223242526
  1. import { R as VERSION, r as defineConfig, t as ConfigExport } from "./shared/define-config-kIZKjX8Q.mjs";
  2. //#region src/utils/load-config.d.ts
  3. type ConfigLoader = "bundle" | "native";
  4. interface LoadConfigOptions {
  5. /**
  6. * How to load the config file.
  7. * - `'bundle'` (default): bundle the config with Rolldown, then import it.
  8. * - `'native'`: import the config directly, delegating TypeScript/loader
  9. * handling to the runtime. Faster, but requires runtime support.
  10. *
  11. * @default 'bundle'
  12. */
  13. configLoader?: ConfigLoader;
  14. }
  15. /**
  16. * Load config from a file in a way that Rolldown does.
  17. *
  18. * @param configPath The path to the config file. If empty, it will look for `rolldown.config` with supported extensions in the current working directory.
  19. * @param options Loading options. `configLoader` selects `'bundle'` (default) or `'native'`.
  20. * @returns The loaded config export
  21. *
  22. * @category Config
  23. */
  24. export declare function loadConfig(configPath: string, options?: LoadConfigOptions): Promise<ConfigExport>;
  25. //#endregion
  26. export { VERSION, defineConfig };