UNPKG

sitecore-jss-rule-engine-nextjs

Version:

18 lines (14 loc) 469 B
interface Plugin { /** * A function which will be called during path extraction */ exec(path: string): string; } import { normalizePersonalizedRewrite } from '../../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();