From 0b398f4d67f1b4f0e39477efbeb4b99f4d2129fc Mon Sep 17 00:00:00 2001 From: yutent Date: Thu, 11 May 2023 18:17:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=A5=E5=8F=A3=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=9C=89=E6=A0=B7=E5=BC=8F=E5=BC=95=E7=94=A8=E6=97=B6?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/compile-vue.js | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/compile-vue.js b/lib/compile-vue.js index 7cdd547..9465c8e 100644 --- a/lib/compile-vue.js +++ b/lib/compile-vue.js @@ -136,6 +136,11 @@ export function parseJs( if (isBuild) { ASSETS_DIR = '/assets/' } + + if (IS_ENTRY) { + fixedStyle += 'const __sheets__ = [...document.adoptedStyleSheets];\n' + } + try { code = Es.transformSync(code).code || '' } catch (e) { diff --git a/package.json b/package.json index 0b41e7d..6ac79c7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fite", "type": "module", - "version": "0.9.0", + "version": "0.9.1", "bin": { "fite": "index.js" },