ms-vite-plugin 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.js +4 -3
- package/package.json +1 -1
package/dist/build.js
CHANGED
|
@@ -44,7 +44,7 @@ const vite_1 = require("vite");
|
|
|
44
44
|
const vite_plugin_bundle_obfuscator_1 = __importDefault(require("vite-plugin-bundle-obfuscator"));
|
|
45
45
|
const zip_a_folder_1 = require("zip-a-folder");
|
|
46
46
|
/**
|
|
47
|
-
* 查找入口文件:main.js/main.ts
|
|
47
|
+
* 查找入口文件:main.js/main.ts 和所有以 _thread 结尾的 JS/TS 文件
|
|
48
48
|
* @param src 源目录路径
|
|
49
49
|
* @param baseDir 基础目录路径,用于计算相对路径
|
|
50
50
|
* @returns 返回入口文件的相对路径列表
|
|
@@ -59,8 +59,9 @@ async function findEntryFiles(src, baseDir) {
|
|
|
59
59
|
await walk(fullPath);
|
|
60
60
|
}
|
|
61
61
|
else if (entry.isFile()) {
|
|
62
|
-
// 查找 main.js/main.ts
|
|
63
|
-
if (/^main\.(js|ts)$/.test(entry.name)
|
|
62
|
+
// 查找 main.js/main.ts 或 _thread.js/_thread.ts 文件
|
|
63
|
+
if (/^main\.(js|ts)$/.test(entry.name) ||
|
|
64
|
+
/_thread\.(js|ts)$/.test(entry.name)) {
|
|
64
65
|
result.push(path.relative(baseDir, fullPath));
|
|
65
66
|
}
|
|
66
67
|
}
|