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)