修正那反人类的windows路径

pull/1/head
yutent 2023-02-02 16:44:18 +08:00
parent 20e67d2d4a
commit 3c9238a38e
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,7 @@ export function parseJs(
let tmp = `style${Date.now()}` let tmp = `style${Date.now()}`
fixedStyle += `document.adoptedStyleSheets.push(${tmp})\n` fixedStyle += `document.adoptedStyleSheets.push(${tmp})\n`
// 修正那反人类的windows路径
return `import ${tmp} from '${name}' assert { type: 'css' }\n${tmp}.path = '${name.replace( return `import ${tmp} from '${name}' assert { type: 'css' }\n${tmp}.path = '${name.replace(
/\\/g, /\\/g,
'\\\\' '\\\\'
@ -214,6 +215,7 @@ export function compileVue(file, imports, options = {}, isBuild) {
}) })
CACHE[file].css = scss.join(' ') CACHE[file].css = scss.join(' ')
// 修正那反人类的windows路径
js += ` js += `
let stylesheet = new CSSStyleSheet() let stylesheet = new CSSStyleSheet()
stylesheet.path = '${file stylesheet.path = '${file