mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 20:37:21 +00:00
docs: update cloudflare imports
This commit is contained in:
@@ -12,7 +12,7 @@ export function devFsVitePlugin({
|
||||
}: {
|
||||
verbose?: boolean;
|
||||
configFile?: string;
|
||||
}): Plugin {
|
||||
} = {}): any {
|
||||
let isDev = false;
|
||||
let projectRoot = "";
|
||||
|
||||
@@ -115,7 +115,7 @@ if (typeof globalThis !== 'undefined') {
|
||||
return polyfill + code;
|
||||
}
|
||||
},
|
||||
};
|
||||
} satisfies Plugin;
|
||||
}
|
||||
|
||||
// Write function that uses the dev-fs polyfill injected by our Vite plugin
|
||||
|
||||
@@ -16,7 +16,7 @@ const schema = s.partialObject({
|
||||
metadata: s.string({ enum: ["copyright", "keep", "none"] }),
|
||||
quality: s.number({ minimum: 1, maximum: 100 }),
|
||||
});
|
||||
type ImageOptimizationSchema = s.Static<typeof schema>;
|
||||
export type CloudflareImageOptimizationSchema = s.Static<typeof schema>;
|
||||
|
||||
export type CloudflareImageOptimizationOptions = {
|
||||
/**
|
||||
@@ -38,12 +38,12 @@ export type CloudflareImageOptimizationOptions = {
|
||||
* The default options to use
|
||||
* @default {}
|
||||
*/
|
||||
defaultOptions?: ImageOptimizationSchema;
|
||||
defaultOptions?: CloudflareImageOptimizationSchema;
|
||||
/**
|
||||
* The fixed options to use
|
||||
* @default {}
|
||||
*/
|
||||
fixedOptions?: ImageOptimizationSchema;
|
||||
fixedOptions?: CloudflareImageOptimizationSchema;
|
||||
/**
|
||||
* The cache control to use
|
||||
* @default public, max-age=31536000, immutable
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export {
|
||||
cloudflareImageOptimization,
|
||||
type CloudflareImageOptimizationSchema,
|
||||
type CloudflareImageOptimizationOptions,
|
||||
} from "./cloudflare/image-optimization.plugin";
|
||||
export { showRoutes, type ShowRoutesOptions } from "./dev/show-routes.plugin";
|
||||
|
||||
Reference in New Issue
Block a user