Install Nuxt Skew Protection
Setup Module
Want to know why you need this module? Check out the introduction.
To get started with Nuxt Robots, you need to install the dependency and add it to your Nuxt config.
npx nuxt module add skew-protectionnpm i nuxt-skew-protectionYou will need to manually add the module to your Nuxt config.
export default defineNuxtConfig({
modules: [
'nuxt-skew-protection',
],
})
yarn add nuxt-skew-protectionYou will need to manually add the module to your Nuxt config.
export default defineNuxtConfig({
modules: [
'nuxt-skew-protection',
],
})
pnpm i nuxt-skew-protectionYou will need to manually add the module to your Nuxt config.
export default defineNuxtConfig({
modules: [
'nuxt-skew-protection',
],
})
bun i nuxt-skew-protectionYou will need to manually add the module to your Nuxt config.
export default defineNuxtConfig({
modules: [
'nuxt-skew-protection',
],
})
Basic Configuration
Out of the box the module will provide minimal build chunks preservation and a checkForUpdateStrategy. To get the most out of the module
you should configure the following:
- Notification Component: Notifies users when a new version is available and their chunks are outdated.
- Persistance Storage: Ensures previous build manifests are stored and accessible for long-lived assets thresholds.
Skew Cookie
To keep track of the versions, the module uses a cookie to store the user's current build version. This cookies name is
__nkpv, see cookie options for full details.
Verifying Installation
Once you build and deploy the module you can check your Nuxt App Manifest file, it's locally at /_nuxt/builds/latest.json. Within
it you should find a manifest of previous builds within the configured cache threshold.