From 93603bf5c724f7f7a510ca0f9799d322f8b880b7 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Fri, 26 Jan 2024 10:25:06 +0800 Subject: [PATCH 1/2] fix: specify unspported pre-processors lang --- src/transform.ts | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/transform.ts b/src/transform.ts index cad23db8..44bf9929 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -75,13 +75,24 @@ export async function compileFile( return errors } - if ( - descriptor.styles.some((s) => s.lang) || - (descriptor.template && descriptor.template.lang) - ) { + const styleLang = descriptor.styles.map((s) => s.lang).filter(Boolean) + const templateLang = descriptor.template?.lang + if (styleLang.length && templateLang) { + return [ + `lang="${styleLang.join( + ',', + )}" pre-processors for