[chore] [ee-bin] Do not use path. join() to ensure consistent performance between Windows and macOS

This commit is contained in:
gaoshuaixing
2025-04-15 16:07:30 +08:00
parent d95bb1fd55
commit fc2d73a048
3 changed files with 5 additions and 6287 deletions

6284
.gitignore vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "ee-bin",
"version": "4.1.7",
"version": "4.1.8",
"description": "ee bin",
"main": "index.js",
"scripts": {

View File

@@ -321,9 +321,11 @@ class ServeProcess {
//console.log("debugger:", pkg.main)
writeJsonSync(pkgPath, pkg);
} else {
// [todo] Do not use path. join() to ensure consistent performance between Windows and macOS
// const bundleMainPath = path.join(this.bundleDir, '/main.js');
const bundleMainPath = this.bundleDir + '/main.js';
// Modify when the path is incorrect to reduce unnecessary operations
const bundleMainPath = path.join(this.bundleDir, 'main.js');
//console.log("build:", bundleMainPath)
if (pkg.main != bundleMainPath) {
pkg.main = bundleMainPath;
writeJsonSync(pkgPath, pkg);