From 3c9238a38e19bd1aaab54f6dbfedcdf746187912 Mon Sep 17 00:00:00 2001 From: yutent Date: Thu, 2 Feb 2023 16:44:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=82=A3=E5=8F=8D=E4=BA=BA?= =?UTF-8?q?=E7=B1=BB=E7=9A=84windows=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/compile-vue.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/compile-vue.js b/lib/compile-vue.js index 35ab386..d00efe9 100644 --- a/lib/compile-vue.js +++ b/lib/compile-vue.js @@ -142,6 +142,7 @@ export function parseJs( let tmp = `style${Date.now()}` fixedStyle += `document.adoptedStyleSheets.push(${tmp})\n` + // 修正那反人类的windows路径 return `import ${tmp} from '${name}' assert { type: 'css' }\n${tmp}.path = '${name.replace( /\\/g, '\\\\' @@ -214,6 +215,7 @@ export function compileVue(file, imports, options = {}, isBuild) { }) CACHE[file].css = scss.join(' ') + // 修正那反人类的windows路径 js += ` let stylesheet = new CSSStyleSheet() stylesheet.path = '${file