fxxk windows
parent
4823362b21
commit
20e67d2d4a
|
@ -142,7 +142,10 @@ export function parseJs(
|
|||
let tmp = `style${Date.now()}`
|
||||
fixedStyle += `document.adoptedStyleSheets.push(${tmp})\n`
|
||||
|
||||
return `import ${tmp} from '${name}' assert { type: 'css' }\n${tmp}.path = '${name}'`
|
||||
return `import ${tmp} from '${name}' assert { type: 'css' }\n${tmp}.path = '${name.replace(
|
||||
/\\/g,
|
||||
'\\\\'
|
||||
)}'`
|
||||
} else {
|
||||
if (name.startsWith('@/')) {
|
||||
name = name.replace('@/', '/assets/js/')
|
||||
|
@ -213,9 +216,9 @@ export function compileVue(file, imports, options = {}, isBuild) {
|
|||
|
||||
js += `
|
||||
let stylesheet = new CSSStyleSheet()
|
||||
stylesheet.path = '${file.slice(
|
||||
options.IS_MPA ? options.pagesDir.length : options.root.length
|
||||
)}'
|
||||
stylesheet.path = '${file
|
||||
.slice(options.IS_MPA ? options.pagesDir.length : options.root.length)
|
||||
.replace(/\\/g, '\\\\')}'
|
||||
stylesheet.replaceSync(\`${CACHE[file].css}\`)
|
||||
document.adoptedStyleSheets.push(stylesheet)
|
||||
`
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@bytedo/vue-live",
|
||||
"type": "module",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"bin": {
|
||||
"vue-live": "index.js"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue