mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
feat(nuxt): allow configuring plugins directory (#7981)
This commit is contained in:
parent
2299fdc70a
commit
1477d3759e
@ -104,8 +104,8 @@ export async function resolveApp (nuxt: Nuxt, app: NuxtApp) {
|
||||
...(config.plugins || []),
|
||||
...config.srcDir
|
||||
? await resolveFiles(config.srcDir, [
|
||||
'plugins/*.{ts,js,mjs,cjs,mts,cts}',
|
||||
'plugins/*/index.*{ts,js,mjs,cjs,mts,cts}'
|
||||
`${config.dir?.plugins || 'plugins'}/*.{ts,js,mjs,cjs,mts,cts}`,
|
||||
`${config.dir?.plugins || 'plugins'}/*/index.*{ts,js,mjs,cjs,mts,cts}`
|
||||
])
|
||||
: []
|
||||
].map(plugin => normalizePlugin(plugin as NuxtPlugin)))
|
||||
|
@ -503,6 +503,11 @@ export default defineUntypedSchema({
|
||||
* @version 3
|
||||
*/
|
||||
pages: 'pages',
|
||||
/**
|
||||
* The plugins directory, each file of which will be auto-registered as a Nuxt plugin.
|
||||
* @version 3
|
||||
*/
|
||||
plugins: 'plugins',
|
||||
/**
|
||||
* The directory containing your static files, which will be directly accessible via the Nuxt server
|
||||
* and copied across into your `dist` folder when your app is generated.
|
||||
|
Loading…
Reference in New Issue
Block a user