mini-entry
Advanced tools
Comparing version 0.3.3 to 0.4.0
@@ -5,3 +5,3 @@ /* | ||
* @Last Modified by: youzhao.zhou | ||
* @Last Modified time: 2022-07-11 10:27:25 | ||
* @Last Modified time: 2023-11-17 15:55:12 | ||
* @Description 获取webpack入口 | ||
@@ -250,4 +250,9 @@ * | ||
let scriptPath = getAbsolutePath(`${page}.${config.entrySuffix.js}`); | ||
entry[entryName] = [getAbsolutePath(`${page}.${config.entrySuffix.xml}`)]; | ||
const xmlPath = getAbsolutePath(`${page}.${config.entrySuffix.xml}`); | ||
entry[entryName] = []; | ||
if (fs.existsSync(xmlPath)) { | ||
entry[entryName] = [xmlPath]; | ||
} | ||
const pageJsonPath = getAbsolutePath(`${page}.json`); | ||
@@ -321,2 +326,7 @@ const pageJsonPathByPlatform = getAbsolutePath( | ||
subPackagesDir.push(page.root); | ||
if (page.pages <= 0) { | ||
return [join(page.root || "", "index")] | ||
} | ||
return page.pages.map((subPage) => { | ||
@@ -323,0 +333,0 @@ return join(page.root || "", subPage); |
{ | ||
"name": "mini-entry", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"description": "解析小程序json", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
17349
606