23 lines
803 B
JavaScript
23 lines
803 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.getLivePluginConfig = getLivePluginConfig;
|
|
function getLivePluginConfig(api, fallback) {
|
|
const root = api.config || {};
|
|
const plugins = root.plugins || {};
|
|
const entries = plugins.entries || {};
|
|
const entry = entries['harbor-forge'] || {};
|
|
const cfg = entry.config || {};
|
|
if (Object.keys(cfg).length > 0 || Object.keys(entry).length > 0) {
|
|
return {
|
|
...fallback,
|
|
...cfg,
|
|
enabled: typeof cfg.enabled === 'boolean'
|
|
? cfg.enabled
|
|
: typeof entry.enabled === 'boolean'
|
|
? entry.enabled
|
|
: fallback.enabled,
|
|
};
|
|
}
|
|
return fallback;
|
|
}
|
|
//# sourceMappingURL=live-config.js.map
|