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