From 0bdeff20d01ee6d678fe93c74e273ca32ff59619 Mon Sep 17 00:00:00 2001 From: ayoayco Date: Sat, 3 Aug 2024 10:46:54 +0200 Subject: [PATCH] refactor: move declaration inside function --- index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 3dd847a..408e89a 100644 --- a/index.js +++ b/index.js @@ -12,11 +12,6 @@ import { randomUUID } from "node:crypto"; * @typedef {import('astro').AstroIntegration} AstroIntegration */ -/** - * @type {Array} - */ -let assets = []; - const plugin_dir = path.resolve(path.dirname('.')); /** @@ -32,7 +27,10 @@ export default function serviceWorker(config) { path: serviceWorkerPath } = config; - console.log('[astro-sw] dir', plugin_dir) + /** + * @type {Array} + */ + let assets = []; return { 'name': 'astro-sw',