UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

29 lines (28 loc) 797 B
import { applyDependencyPatches, applyOptimizePatches } from "vxrn"; let hasAppliedOptimizePatches = !1; function fixDependenciesPlugin(options) { const patches = []; for (const key in options) { const value = options[key]; patches.push({ module: key, patchFiles: value && typeof value == "object" ? value : { optimize: value } }); } return { name: "one-fix-dependencies", enforce: "pre", async config(config) { !hasAppliedOptimizePatches && patches.length && (hasAppliedOptimizePatches = !0, await applyOptimizePatches(patches, config)); }, async configResolved(config) { await applyDependencyPatches(patches, config); } }; } export { fixDependenciesPlugin }; //# sourceMappingURL=fixDependenciesPlugin.js.map