lib/webVitals/checkForWebVitalsPlugin
Variables
'Read the “', Variables, '” section'webVitalsName
'Read the “', webVitalsName, '” section'const webVitalsName: "@astrojs/web-vitals" = '@astrojs/web-vitals';
Defined in: studiocms/packages/studiocms/src/lib/webVitals/checkForWebVitalsPlugin.ts:10
Functions
'Read the “', Functions, '” section'checkForWebVitals()
'Read the “', checkForWebVitals(), '” section'function checkForWebVitals(params: { addClientDirective: (directive: ClientDirectiveConfig) => void; addDevToolbarApp: (entrypoint: DevToolbarAppEntry) => void; addMiddleware: (mid: AstroIntegrationMiddleware) => void; addRenderer: (renderer: AstroRenderer) => void; addWatchFile: (path: string | URL) => void; command: "dev" | "build" | "preview" | "sync"; config: AstroConfig; createCodegenDir: () => URL; injectRoute: (injectRoute: InjectedRoute) => void; injectScript: (stage: InjectedScriptStage, content: string) => void; isRestart: boolean; logger: AstroIntegrationLogger; updateConfig: (newConfig: DeepPartial<AstroConfig>) => AstroConfig; }, ...args: [{ name: string; verbose: boolean; version: string; }]): | null | StudioCMSPlugin
Defined in: studiocms/packages/studiocms/src/lib/webVitals/checkForWebVitalsPlugin.ts:25
Checks for the presence of the Web Vitals integration and sets up the necessary configurations.
Parameters
'Read the “', Parameters, '” section'The parameters provided by the Astro configuration setup.
addClientDirective
'Read the “', addClientDirective, '” section'(directive
: ClientDirectiveConfig
) => void
addDevToolbarApp
'Read the “', addDevToolbarApp, '” section'(entrypoint
: DevToolbarAppEntry
) => void
addMiddleware
'Read the “', addMiddleware, '” section'(mid
: AstroIntegrationMiddleware
) => void
addRenderer
'Read the “', addRenderer, '” section'(renderer
: AstroRenderer
) => void
addWatchFile
'Read the “', addWatchFile, '” section'(path
: string
| URL
) => void
"dev"
| "build"
| "preview"
| "sync"
AstroConfig
createCodegenDir
'Read the “', createCodegenDir, '” section'() => URL
injectRoute
'Read the “', injectRoute, '” section'(injectRoute
: InjectedRoute
) => void
injectScript
'Read the “', injectScript, '” section'(stage
: InjectedScriptStage
, content
: string
) => void
isRestart
'Read the “', isRestart, '” section'boolean
AstroIntegrationLogger
updateConfig
'Read the “', updateConfig, '” section'(newConfig
: DeepPartial
<AstroConfig
>) => AstroConfig
…[{
name
: string
;
verbose
: boolean
;
version
: string
;
}]
| null
| StudioCMSPlugin
A StudioCMSPlugin object if the Web Vitals integration is enabled, otherwise null.