修复开发模式

master
yutent 2024-08-01 13:55:40 +08:00
parent 2b9599781e
commit fa84cc0c5d
2 changed files with 13 additions and 3 deletions

View File

@ -179,7 +179,10 @@ export default async function createServer(root = '', conf = {}) {
currentPage,
IS_ENTRY: true,
DEPLOY_PATH,
LEGACY_MODE
LEGACY_MODE,
isCustomElement,
plugin,
define
},
page.entry
)
@ -270,10 +273,12 @@ export default async function createServer(root = '', conf = {}) {
break
case 'js':
case 'wasm':
{
let rpath = pathname.replace('@/', '')
let file
let isJson = false
let isWasm = rpath.endsWith('.wasm')
if (rpath.endsWith('json.js')) {
isJson = true
@ -309,6 +314,8 @@ export default async function createServer(root = '', conf = {}) {
} catch (err) {
console.log('%s 语法错误: %s', rpath, red(err.message))
}
} else if (isWasm) {
//
} else {
code = parseJs(
code + '',
@ -317,7 +324,10 @@ export default async function createServer(root = '', conf = {}) {
IS_MPA,
currentPage,
DEPLOY_PATH,
LEGACY_MODE
LEGACY_MODE,
isCustomElement,
plugin,
define
},
file
)

View File

@ -1,7 +1,7 @@
{
"name": "fite",
"type": "module",
"version": "1.4.1",
"version": "1.4.2",
"bin": {
"fite": "index.js"
},