Hollis Wu
Hollis Wu
NNuxt
Created by Edik on 4/26/2024 in #❓・help
Plugins - add third party plugin to Nuxt
That will expose all symbols in the package as auto import. To select symbols, use the from and imports key in unimport https://github.com/unjs/unimport
9 replies
NNuxt
Created by Edik on 4/26/2024 in #❓・help
Plugins - add third party plugin to Nuxt
I guess you can do something like:
export default defineNuxtConfig({
// For auto import in nuxt side
imports: {
presets: [
{ package: "fast-json-patch" },
],
},

// For auto import in nitro side
nitro: {
imports: {
presets: [
{ package: "fast-json-patch" },
],
},
},
})
export default defineNuxtConfig({
// For auto import in nuxt side
imports: {
presets: [
{ package: "fast-json-patch" },
],
},

// For auto import in nitro side
nitro: {
imports: {
presets: [
{ package: "fast-json-patch" },
],
},
},
})
9 replies