From fa84cc0c5d36fb000d6c66bddc2a7bdd085662c8 Mon Sep 17 00:00:00 2001 From: yutent Date: Thu, 1 Aug 2024 13:55:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=8F=91=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/dev.js | 14 ++++++++++++-- package.json | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/dev.js b/lib/dev.js index 9bc8f63..62104f7 100644 --- a/lib/dev.js +++ b/lib/dev.js @@ -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 ) diff --git a/package.json b/package.json index 7e819f3..3b606ba 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fite", "type": "module", - "version": "1.4.1", + "version": "1.4.2", "bin": { "fite": "index.js" },