From e7c5b73d0e6632fc28f31553f072605fdfebcbf5 Mon Sep 17 00:00:00 2001 From: liaoxuezhi <2betop.cn@gmail.com> Date: Tue, 28 Mar 2023 15:54:11 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20vite=20=E6=A8=A1=E5=BC=8F=E4=B8=8B=20m?= =?UTF-8?q?oible=20=E9=A2=84=E8=A7=88=E8=B5=84=E6=BA=90=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E6=94=B9=E6=88=90=E6=BA=90=E7=A0=81=20(#6483)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/transformMobileHtml.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/transformMobileHtml.ts b/scripts/transformMobileHtml.ts index 6410b6ec5..eb87d656f 100644 --- a/scripts/transformMobileHtml.ts +++ b/scripts/transformMobileHtml.ts @@ -19,7 +19,11 @@ export default function transformMobileHtml(options: {} = {}): Plugin { file.path === '/examples/index.html' ) { html = html.replace(/href=('|")(.*?)\1/g, (_, quote, value) => { - if ( + if (/^amis\/lib\/themes\/(.*)\.css$/.test(value)) { + return `href=${quote}../../packages/amis-ui/scss/themes/${RegExp.$1}.scss${quote}`; + } else if (/^amis\/lib\/helper\.css$/.test(value)) { + return `href=${quote}../../packages/amis-ui/scss/helper.scss${quote}`; + } else if ( /^(?:amis|amis\-core|amis\-formula|amis\-ui|office\-viewer)/.test( value )