UNPKG

@jss-rule-engine/nextjs

Version:

18 lines (14 loc) 490 B
interface Plugin { /** * A function which will be called during path extraction */ exec(path: string): string; } import { normalizePersonalizedRewrite } from '@jss-rule-engine/edge/dist/lib/personalizationUtils'; export class ScPersonalizePlugin implements Plugin { exec(path: string) { // Remove personalize rewrite segment from the path return normalizePersonalizedRewrite(path); } } export const scpersonalizePlugin = new ScPersonalizePlugin();