url.d.ts 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. export interface VueQuery {
  2. vue?: boolean;
  3. src?: boolean;
  4. type?: 'script' | 'template' | 'style' | 'custom';
  5. index?: number;
  6. lang?: string;
  7. raw?: boolean;
  8. setup?: boolean;
  9. 'lang.ts'?: string;
  10. 'lang.js'?: string;
  11. }
  12. export declare function parseVueRequest(id: string): {
  13. filename: string;
  14. query: VueQuery;
  15. };
  16. export declare const isImportRequest: (url: string) => boolean;
  17. /**
  18. * Prefix for resolved fs paths, since windows paths may not be valid as URLs.
  19. */
  20. export declare const FS_PREFIX = "/@fs/";
  21. /**
  22. * Prefix for resolved Ids that are not valid browser import specifiers
  23. */
  24. export declare const VALID_ID_PREFIX = "/@id/";
  25. export declare const CLIENT_PUBLIC_PATH = "/@vite/client";
  26. export declare const ENV_PUBLIC_PATH = "/@vite/env";
  27. export declare const isInternalRequest: (url: string) => boolean;
  28. export declare const queryRE: RegExp;
  29. export declare const hashRE: RegExp;
  30. export declare const cleanUrl: (url: string) => string;
  31. export declare function isJsFile(id: string): boolean;