uc-dev 1.0.0-beta.3 → 1.0.0-beta.4
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/out/cli.js +10 -5
- package/package.json +1 -1
package/out/cli.js
CHANGED
|
@@ -1208,8 +1208,12 @@ var ConfigHandler = class {
|
|
|
1208
1208
|
const pathAlias = prow.config?.browser?.importmap ?? {};
|
|
1209
1209
|
for (let [als, relPath] of Object.entries(pathAlias)) {
|
|
1210
1210
|
als = trimPath(als);
|
|
1211
|
-
let fpath =
|
|
1212
|
-
let resolvPath =
|
|
1211
|
+
let fpath = prow.projectPath;
|
|
1212
|
+
let resolvPath = path2.resolve(fpath, relPath);
|
|
1213
|
+
if (!fs2.existsSync(resolvPath)) {
|
|
1214
|
+
console.warn("ImportMap path not found:", resolvPath);
|
|
1215
|
+
continue;
|
|
1216
|
+
}
|
|
1213
1217
|
const isDir = fs2.statSync(resolvPath).isDirectory();
|
|
1214
1218
|
let np = correctpath(path2.relative(fpath, resolvPath));
|
|
1215
1219
|
np = cpath(np, isDir);
|
|
@@ -1349,7 +1353,6 @@ var ConfigHandler = class {
|
|
|
1349
1353
|
const pkgJsonPath = appRequire.resolve(`${pkgName}/package.json`);
|
|
1350
1354
|
return path2.dirname(pkgJsonPath);
|
|
1351
1355
|
} catch (ee) {
|
|
1352
|
-
console.log(ee);
|
|
1353
1356
|
return null;
|
|
1354
1357
|
}
|
|
1355
1358
|
}
|
|
@@ -7627,9 +7630,11 @@ function registerMain() {
|
|
|
7627
7630
|
encrypt: cfg.encryptResource
|
|
7628
7631
|
}));
|
|
7629
7632
|
mp.cssGuid = JSON.stringify(ResourceKeyBridge.extractKey(_cssbuilder.build(stylePath, {})));
|
|
7630
|
-
if (cfg.cli.baseHtmlPath != void 0) {
|
|
7633
|
+
if (cfg.cli.baseHtmlPath != void 0 && cfg.cli.baseHtmlPath.length > 0) {
|
|
7631
7634
|
let htmlPath = join8(_mainProj.projectPath, cfg.cli.baseHtmlPath);
|
|
7632
|
-
|
|
7635
|
+
const mainHtmlRes = _cssbuilder.build(htmlPath, {});
|
|
7636
|
+
if (mainHtmlRes != void 0)
|
|
7637
|
+
mp.mainHtmlGuid = ResourceKeyBridge.extractKey(mainHtmlRes);
|
|
7633
7638
|
}
|
|
7634
7639
|
mp.ucConfigGuid = JSON.stringify(ResourceKeyBridge.extractKey(_cssbuilder.build(void 0, {
|
|
7635
7640
|
content: JSON.stringify(_mainProj.config)
|