From 3deef37049849afe301a8f5401a3c97bd4a7f8ca Mon Sep 17 00:00:00 2001 From: Maksim Nedoshev Date: Tue, 31 Oct 2023 04:19:48 +0200 Subject: [PATCH] fix(build): append css to non-script components --- packages/ui/build/plugins/append-component-css.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/build/plugins/append-component-css.ts b/packages/ui/build/plugins/append-component-css.ts index 6858a38cda..773e8d5444 100644 --- a/packages/ui/build/plugins/append-component-css.ts +++ b/packages/ui/build/plugins/append-component-css.ts @@ -31,8 +31,8 @@ const isVuesticComponent = (filename: string) => { const isTemplateFile = /Va\w*\.m?js$/.test(filename) // Va[ComponentName].vue_vue_type_script_lang.mjs - const scriptFilePath = filename.replace('.mjs', '.vue_vue_type_script_lang.mjs') - const scriptSetupFilePath = filename.replace('.mjs', '.vue_vue_type_script_setup_true_lang.mjs') + const scriptFilePath = filename.replace(/\.(mjs|js)/, '.vue_vue_type_script_lang.mjs') + const scriptSetupFilePath = filename.replace(/\.(mjs|js)/, '.vue_vue_type_script_setup_true_lang.mjs') const haveScript = existsSync(scriptFilePath) || existsSync(scriptSetupFilePath)