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
50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
type LoaderCallback = (err: Error | undefined | null, content?: string | Buffer, sourceMap?: string | any) => void;
|
|
export type LoaderThis<Options> = {
|
|
/**
|
|
* Path to the file being loaded
|
|
*
|
|
* https://webpack.js.org/api/loaders/#thisresourcepath
|
|
*/
|
|
resourcePath: string;
|
|
/**
|
|
* Function to add outside file used by loader to `watch` process
|
|
*
|
|
* https://webpack.js.org/api/loaders/#thisadddependency
|
|
*/
|
|
addDependency: (filepath: string) => void;
|
|
/**
|
|
* Marks a loader result as cacheable.
|
|
*
|
|
* https://webpack.js.org/api/loaders/#thiscacheable
|
|
*/
|
|
cacheable: (flag: boolean) => void;
|
|
/**
|
|
* Marks a loader as asynchronous
|
|
*
|
|
* https://webpack.js.org/api/loaders/#thisasync
|
|
*/
|
|
async: () => undefined | LoaderCallback;
|
|
/**
|
|
* Return errors, code, and sourcemaps from an asynchronous loader
|
|
*
|
|
* https://webpack.js.org/api/loaders/#thiscallback
|
|
*/
|
|
callback: LoaderCallback;
|
|
} & ({
|
|
/**
|
|
* Loader options in Webpack 4
|
|
*
|
|
* https://webpack.js.org/api/loaders/#thisquery
|
|
*/
|
|
query: Options;
|
|
} | {
|
|
/**
|
|
* Loader options in Webpack 5
|
|
*
|
|
* https://webpack.js.org/api/loaders/#thisgetoptionsschema
|
|
*/
|
|
getOptions: () => Options;
|
|
});
|
|
export {};
|
|
//# sourceMappingURL=types.d.ts.map
|