@vizejs/vite-plugin-musea 0.289.0 → 0.291.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/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,8 @@ import fs from "node:fs";
|
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
9
|
import crypto from "node:crypto";
|
|
10
|
-
import { VIZE_CONFIG_FILE_ENV, loadConfig
|
|
10
|
+
import { VIZE_CONFIG_FILE_ENV, loadConfig } from "@vizejs/vite-plugin";
|
|
11
|
+
import { getResolvedVizeConfigRegistration } from "@vizejs/vite-plugin/internal/config-bridge";
|
|
11
12
|
import * as vite from "vite";
|
|
12
13
|
//#region src/with-defaults.ts
|
|
13
14
|
/**
|
|
@@ -3718,13 +3719,17 @@ function relativeUrl(fromDir, toFile) {
|
|
|
3718
3719
|
}
|
|
3719
3720
|
//#endregion
|
|
3720
3721
|
//#region src/plugin/config.ts
|
|
3721
|
-
async function resolveMuseaSharedConfig(resolvedConfig) {
|
|
3722
|
-
|
|
3723
|
-
if (
|
|
3722
|
+
async function resolveMuseaSharedConfig(resolvedConfig, loadConfigFile = loadConfig) {
|
|
3723
|
+
let registration = getResolvedVizeConfigRegistration(resolvedConfig);
|
|
3724
|
+
if (!registration.registered) {
|
|
3725
|
+
await Promise.resolve();
|
|
3726
|
+
registration = getResolvedVizeConfigRegistration(resolvedConfig);
|
|
3727
|
+
}
|
|
3728
|
+
if (registration.registered) return await registration.config;
|
|
3724
3729
|
const configFile = process.env[VIZE_CONFIG_FILE_ENV];
|
|
3725
3730
|
if (!configFile) return null;
|
|
3726
3731
|
try {
|
|
3727
|
-
return await
|
|
3732
|
+
return await loadConfigFile(resolvedConfig.root, {
|
|
3728
3733
|
configFile,
|
|
3729
3734
|
env: {
|
|
3730
3735
|
mode: resolvedConfig.mode,
|