mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-21 16:09:52 +00:00
chore: fix ci
This commit is contained in:
parent
1537eb4e65
commit
00e92f89c3
@ -9,7 +9,7 @@ import { toArray } from '../utils'
|
||||
|
||||
/** @deprecated */
|
||||
// TODO: Remove support for compiling ejs templates in v4
|
||||
export async function compileTemplate (template: NuxtTemplate, ctx: any) {
|
||||
export async function compileTemplate <T>(template: NuxtTemplate<T>, ctx: any) {
|
||||
const data = { ...ctx, options: template.options }
|
||||
if (template.src) {
|
||||
try {
|
||||
|
@ -36,7 +36,7 @@ export async function generateApp (nuxt: Nuxt, app: NuxtApp, options: { filter?:
|
||||
// Compile templates into vfs
|
||||
// TODO: remove utils in v4
|
||||
const templateContext = { utils: templateUtils, nuxt, app }
|
||||
const filteredTemplates = (app.templates as Array<ReturnType<typeof normalizeTemplate>>)
|
||||
const filteredTemplates = (app.templates as Array<ResolvedNuxtTemplate<any>>)
|
||||
.filter(template => !options.filter || options.filter(template))
|
||||
|
||||
const writes: Array<() => void> = []
|
||||
|
@ -366,6 +366,7 @@ export default defineNuxtModule({
|
||||
addTemplate({
|
||||
filename: 'routes.mjs',
|
||||
getContents ({ app }) {
|
||||
if (!app.pages) return ''
|
||||
const { routes, imports } = normalizeRoutes(app.pages)
|
||||
return [...imports, `export default ${routes}`].join('\n')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user