@jsenv/core 29.3.2 → 29.4.0
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/main.js +4 -1
- package/package.json +1 -1
- package/src/build/start_build_server.js +5 -1
package/dist/main.js
CHANGED
|
@@ -26332,7 +26332,7 @@ const startBuildServer = async ({
|
|
|
26332
26332
|
keepProcessAlive = true,
|
|
26333
26333
|
rootDirectoryUrl,
|
|
26334
26334
|
buildDirectoryUrl,
|
|
26335
|
-
buildIndexPath = "
|
|
26335
|
+
buildIndexPath = "index.html",
|
|
26336
26336
|
buildServerFiles = {
|
|
26337
26337
|
"./package.json": true,
|
|
26338
26338
|
"./jsenv.config.mjs": true
|
|
@@ -26359,6 +26359,9 @@ const startBuildServer = async ({
|
|
|
26359
26359
|
}
|
|
26360
26360
|
buildIndexPath = buildIndexUrl.slice(buildDirectoryUrl.length);
|
|
26361
26361
|
}
|
|
26362
|
+
if (!existsSync(new URL(buildIndexPath, buildDirectoryUrl))) {
|
|
26363
|
+
buildIndexPath = null;
|
|
26364
|
+
}
|
|
26362
26365
|
}
|
|
26363
26366
|
const operation = Abort.startOperation();
|
|
26364
26367
|
operation.addAbortSignal(signal);
|
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* we want to be in the user shoes and we should not alter build files.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
import { existsSync } from "node:fs"
|
|
16
17
|
import { parentPort } from "node:worker_threads"
|
|
17
18
|
import {
|
|
18
19
|
jsenvAccessControlAllowedHeaders,
|
|
@@ -48,7 +49,7 @@ export const startBuildServer = async ({
|
|
|
48
49
|
|
|
49
50
|
rootDirectoryUrl,
|
|
50
51
|
buildDirectoryUrl,
|
|
51
|
-
buildIndexPath = "
|
|
52
|
+
buildIndexPath = "index.html",
|
|
52
53
|
buildServerFiles = {
|
|
53
54
|
"./package.json": true,
|
|
54
55
|
"./jsenv.config.mjs": true,
|
|
@@ -77,6 +78,9 @@ export const startBuildServer = async ({
|
|
|
77
78
|
}
|
|
78
79
|
buildIndexPath = buildIndexUrl.slice(buildDirectoryUrl.length)
|
|
79
80
|
}
|
|
81
|
+
if (!existsSync(new URL(buildIndexPath, buildDirectoryUrl))) {
|
|
82
|
+
buildIndexPath = null
|
|
83
|
+
}
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
const operation = Abort.startOperation()
|