Complete configuration options for nuxt.config.ts.
export default defineNuxtConfig({
modules: ['nuxt-skew-protection'],
skewProtection: {
// Your configuration here
}
})
enabled: booleantrueEnables or disables the module.
storage: StorageOptions{ driver: 'fs', base: 'node_modules/.cache/nuxt-seo/skew-protection' }Storage configuration for version assets and metadata. Required for production.
export default defineNuxtConfig({
skewProtection: {
storage: {
driver: 'fs', // or 'redis', 's3', 'cloudflare-kv-binding', etc.
// Driver-specific options
}
}
})
See Storage Configuration for all drivers.
checkForUpdateStrategy: 'polling' | 'sse' | 'ws'Strategy for checking for version updates.
skewProtection: {
checkForUpdateStrategy: 'sse'
}
Auto-detection:
'polling''ws''sse'See Update Strategies for details.
retentionDays: number30How many days to keep old versions before cleanup.
skewProtection: {
retentionDays: 7 // Keep versions for 7 days
}
maxNumberOfVersions: number10Maximum number of versions to retain.
skewProtection: {
maxNumberOfVersions: 5 // Keep max 5 versions
}
Cleanup happens during build. Oldest versions are removed first.
cookie: CookieOptionsCookie configuration for storing deployment version.
export default defineNuxtConfig({
skewProtection: {
cookie: {
name: '__nkpv',
path: '/',
sameSite: 'strict',
maxAge: 60 * 60 * 24 * 60 // 60 days
}
}
})
bundlePreviousDeploymentChunks: booleantrueBundles previous deployment chunks to support users on old versions. Old build assets are stored and served to users who haven't refreshed.
export default defineNuxtConfig({
skewProtection: {
bundlePreviousDeploymentChunks: true
}
})
debug: booleanfalseEnables debug logging.
export default defineNuxtConfig({
skewProtection: {
debug: true
}
})
Logs version changes, asset operations, module invalidations, and storage operations.