fix(kit): pass options object to lodash templates (#942)

This commit is contained in:
Dizzy 2021-10-18 09:36:04 +00:00 committed by GitHub
parent 571bf94d39
commit aa2acd5e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -273,7 +273,7 @@ export function addVitePlugin (plugin: VitePlugin, options?: ExtendViteConfigOpt
}
export async function compileTemplate (template: NuxtTemplate, ctx: any) {
const data = { ...ctx, ...template.options }
const data = { ...ctx, options: template.options }
if (template.src) {
try {
const srcContents = await fsp.readFile(template.src, 'utf-8')