vite-plugin-zephyr
Version:
Vite plugin for Zephyr
64 lines (63 loc) • 2.6 kB
JavaScript
;
var __webpack_require__ = {};
(()=>{
__webpack_require__.d = (exports1, getters, values)=>{
var define = (defs, kind)=>{
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
enumerable: true,
[kind]: defs[key]
});
};
define(getters, "get");
define(values, "value");
};
})();
(()=>{
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
__webpack_require__.r = (exports1)=>{
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
value: 'Module'
});
Object.defineProperty(exports1, '__esModule', {
value: true
});
};
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
RESOLVED_ZEPHYR_MF_RUNTIME_PLUGIN_ID: ()=>RESOLVED_ZEPHYR_MF_RUNTIME_PLUGIN_ID,
ZEPHYR_MF_RUNTIME_PLUGIN_ID: ()=>ZEPHYR_MF_RUNTIME_PLUGIN_ID,
ensureRuntimePlugin: ()=>ensureRuntimePlugin,
getRuntimePluginPath: ()=>getRuntimePluginPath
});
const external_path_namespaceObject = require("path");
const ZEPHYR_MF_RUNTIME_PLUGIN_ID = 'virtual:zephyr-mf-runtime-plugin';
const RESOLVED_ZEPHYR_MF_RUNTIME_PLUGIN_ID = `\0${ZEPHYR_MF_RUNTIME_PLUGIN_ID}`;
function getRuntimePluginPath() {
return external_path_namespaceObject.resolve(__dirname, 'runtime_plugin.mjs');
}
function ensureRuntimePlugin(mfConfig) {
const runtimePlugins = [
...mfConfig.runtimePlugins ?? []
];
if (!runtimePlugins.includes(ZEPHYR_MF_RUNTIME_PLUGIN_ID)) runtimePlugins.push(ZEPHYR_MF_RUNTIME_PLUGIN_ID);
mfConfig.runtimePlugins = runtimePlugins;
return mfConfig;
}
exports.RESOLVED_ZEPHYR_MF_RUNTIME_PLUGIN_ID = __webpack_exports__.RESOLVED_ZEPHYR_MF_RUNTIME_PLUGIN_ID;
exports.ZEPHYR_MF_RUNTIME_PLUGIN_ID = __webpack_exports__.ZEPHYR_MF_RUNTIME_PLUGIN_ID;
exports.ensureRuntimePlugin = __webpack_exports__.ensureRuntimePlugin;
exports.getRuntimePluginPath = __webpack_exports__.getRuntimePluginPath;
for(var __rspack_i in __webpack_exports__)if (-1 === [
"RESOLVED_ZEPHYR_MF_RUNTIME_PLUGIN_ID",
"ZEPHYR_MF_RUNTIME_PLUGIN_ID",
"ensureRuntimePlugin",
"getRuntimePluginPath"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
value: true
});
//# sourceMappingURL=ensure_runtime_plugin.js.map