diff --git a/src/module.ts b/src/module.ts index 22d233d..b4ab181 100644 --- a/src/module.ts +++ b/src/module.ts @@ -123,8 +123,10 @@ export default defineNuxtModule({ scripts[s] = template(scriptT)({ options }) } + const replayClickScript = options.replayClick ? scripts.replay : false + const exports = `export const script = ${JSON.stringify(scripts.global, null, 2)} -export const replayScript = ${JSON.stringify(scripts.replay, null, 2)} +export const replayScript = ${JSON.stringify(replayClickScript, null, 2)} export const mode = ${JSON.stringify(options.mode)} export const include = ${JSON.stringify(options.include)} export const exclude = ${JSON.stringify(options.exclude)}