vercel-skew-protection
v0.0.1
Published
[![npm version][npm-version-src]][npm-version-href] [![Codecov][codecov-src]][codecov-href]
Downloads
3
Maintainers
Readme
Vercel Skew Protection
Bringing Vercel's Skew Protection beyond Nextjs with a Vite plugin.
🚧 Currently only tested with Solidjs (SolidStart) on Vite.
Based on original experimentation, also check out the accompanying initial blog post to learn how this works.
Install
npm i vercel-skew-protection
// vite.config.ts
import SkewProtection from "vercel-skew-protection/vite";
export default defineConfig({
plugins: [SkewProtection()],
});
Example: playground/
// rollup.config.js
import SkewProtection from "vercel-skew-protection/rollup";
export default {
plugins: [SkewProtection()],
};
// webpack.config.js
module.exports = {
/* ... */
plugins: [require("vercel-skew-protection/webpack")()],
};
// nuxt.config.js
export default defineNuxtConfig({
modules: [
[
"vercel-skew-protection/nuxt",
{
/* options */
},
],
],
});
This module works for both Nuxt 2 and Nuxt Vite
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require("vercel-skew-protection/webpack")({
/* options */
}),
],
},
};
// esbuild.config.js
import { build } from "esbuild";
import SkewProtection from "vercel-skew-protection/esbuild";
build({
plugins: [SkewProtection()],
});
Development
- Clone this repository
- Install dependencies using
pnpm install
- Run interactive tests using
pnpm play
License
Published under MIT License.