Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
24 lines
791 B
Plaintext
24 lines
791 B
Plaintext
import { TransformOptions } from 'esbuild';
|
|
|
|
declare type LOADERS = 'js' | 'jsx' | 'ts' | 'tsx';
|
|
declare const FILE_LOADERS: Record<string, LOADERS>;
|
|
declare type EXTENSIONS = keyof typeof FILE_LOADERS;
|
|
interface RegisterOptions extends TransformOptions {
|
|
extensions?: EXTENSIONS[];
|
|
/**
|
|
* Auto-ignore node_modules. Independent of any matcher.
|
|
* @default true
|
|
*/
|
|
hookIgnoreNodeModules?: boolean;
|
|
/**
|
|
* A matcher function, will be called with path to a file. Should return truthy if the file should be hooked, falsy otherwise.
|
|
*/
|
|
hookMatcher?(fileName: string): boolean;
|
|
}
|
|
declare function register(esbuildOptions?: RegisterOptions): {
|
|
unregister(): void;
|
|
};
|
|
declare type Register = ReturnType<typeof register>;
|
|
|
|
export { Register, register };
|