@mercurjs/dashboard-sdk 2.0.0-canary.61 → 2.0.0-canary.62
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/index.cjs +6 -6
- package/dist/index.d.cts +1 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -509,8 +509,8 @@ function isPageFile(file) {
|
|
|
509
509
|
return basename === "page";
|
|
510
510
|
}
|
|
511
511
|
var UI_MODULE_KEYS = [
|
|
512
|
-
"
|
|
513
|
-
"
|
|
512
|
+
"admin_ui",
|
|
513
|
+
"vendor_ui"
|
|
514
514
|
];
|
|
515
515
|
async function loadMedusaConfig(medusaConfigPath, root) {
|
|
516
516
|
try {
|
|
@@ -523,14 +523,13 @@ async function loadMedusaConfig(medusaConfigPath, root) {
|
|
|
523
523
|
const appDir = import_path5.default.resolve(import_path5.default.dirname(medusaConfigPath), value.options.appDir);
|
|
524
524
|
if (appDir === root) {
|
|
525
525
|
return {
|
|
526
|
-
backendUrl: value.options.backendUrl ?? "http://localhost:9000",
|
|
527
526
|
base: value.options.path
|
|
528
527
|
};
|
|
529
528
|
}
|
|
530
529
|
}
|
|
531
|
-
return {
|
|
530
|
+
return {};
|
|
532
531
|
} catch {
|
|
533
|
-
return {
|
|
532
|
+
return {};
|
|
534
533
|
}
|
|
535
534
|
}
|
|
536
535
|
function mercurDashboardPlugin(pluginConfig) {
|
|
@@ -541,8 +540,9 @@ function mercurDashboardPlugin(pluginConfig) {
|
|
|
541
540
|
async config(viteConfig) {
|
|
542
541
|
root = viteConfig.root || process.cwd();
|
|
543
542
|
const medusaConfigPath = import_path5.default.resolve(root, pluginConfig.medusaConfigPath);
|
|
544
|
-
const {
|
|
543
|
+
const { base } = await loadMedusaConfig(medusaConfigPath, root);
|
|
545
544
|
const srcDir = import_path5.default.join(root, "src");
|
|
545
|
+
const backendUrl = pluginConfig.backendUrl ?? "http://localhost:9000";
|
|
546
546
|
config = {
|
|
547
547
|
...pluginConfig,
|
|
548
548
|
backendUrl,
|
package/dist/index.d.cts
CHANGED