parent
fa84cc0c5d
commit
dd8ff91294
|
@ -241,6 +241,8 @@ export function parseJs(
|
||||||
` stylesheet.textContent = ${tmp};\n` +
|
` stylesheet.textContent = ${tmp};\n` +
|
||||||
` document.head.appendChild(stylesheet);\n` +
|
` document.head.appendChild(stylesheet);\n` +
|
||||||
`}\n`
|
`}\n`
|
||||||
|
|
||||||
|
return `let ${tmp};\n!(async function(){\n ${tmp} = await __fite_import('${name}', import.meta.url);\n})()`
|
||||||
} else {
|
} else {
|
||||||
// CSSStyleSheet.replaceSync 需要FF v101, Safari 16.4才支持
|
// CSSStyleSheet.replaceSync 需要FF v101, Safari 16.4才支持
|
||||||
fixedStyle +=
|
fixedStyle +=
|
||||||
|
@ -251,8 +253,9 @@ export function parseJs(
|
||||||
` __sheets__.push(stylesheet);\n` +
|
` __sheets__.push(stylesheet);\n` +
|
||||||
` document.adoptedStyleSheets = __sheets__;\n` +
|
` document.adoptedStyleSheets = __sheets__;\n` +
|
||||||
`}\n`
|
`}\n`
|
||||||
|
|
||||||
|
return `const ${tmp} = await __fite_import('${name}', import.meta.url)`
|
||||||
}
|
}
|
||||||
return `const ${tmp} = await __fite_import('${name}', import.meta.url)`
|
|
||||||
} else {
|
} else {
|
||||||
if (name.startsWith('@/')) {
|
if (name.startsWith('@/')) {
|
||||||
name = name.replace('@/', urlJoin(DEPLOY_PATH, ASSETS_DIR))
|
name = name.replace('@/', urlJoin(DEPLOY_PATH, ASSETS_DIR))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "fite",
|
"name": "fite",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.4.2",
|
"version": "1.4.3",
|
||||||
"bin": {
|
"bin": {
|
||||||
"fite": "index.js"
|
"fite": "index.js"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue