mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt3): add support for custom templates (#225)
This commit is contained in:
parent
e2d5a2f4b3
commit
5c67408191
@ -30,6 +30,16 @@ export async function generateApp (nuxt: Nuxt, app: NuxtApp) {
|
||||
data: {}
|
||||
} as NuxtTemplate))
|
||||
|
||||
// Custom templates (created with addTemplate)
|
||||
const customTemplates = nuxt.options.build.templates.map(t => ({
|
||||
path: t.dst,
|
||||
src: t.src,
|
||||
data: {
|
||||
options: t.options
|
||||
}
|
||||
}))
|
||||
app.templates = app.templates.concat(customTemplates)
|
||||
|
||||
// Extend templates
|
||||
await nuxt.callHook('app:templates', app)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user