mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-22 11:22:43 +00:00
chore(nuxt): prefer structuredClone
This commit is contained in:
parent
2cd9f33e6d
commit
4678501953
@ -33,7 +33,7 @@ export default defineNuxtModule<Partial<ImportsOptions>>({
|
||||
}),
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user