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" },