From 4678501953fedeb69f12798c297db85bfa520df9 Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Sat, 7 Dec 2024 19:50:58 +0100 Subject: [PATCH] chore(nuxt): prefer structuredClone --- packages/nuxt/src/imports/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/imports/module.ts b/packages/nuxt/src/imports/module.ts index 5465a180e2..f38c1b3428 100644 --- a/packages/nuxt/src/imports/module.ts +++ b/packages/nuxt/src/imports/module.ts @@ -33,7 +33,7 @@ export default defineNuxtModule>({ }), async setup (options, nuxt) { // TODO: fix sharing of defaults between invocations of modules - const presets = JSON.parse(JSON.stringify(options.presets)) as ImportPresetWithDeprecation[] + const presets = structuredClone(options.presets as ImportPresetWithDeprecation[]) // Allow modules extending sources await nuxt.callHook('imports:sources', presets)