2024-04-26 21:28:51 +08:00

29 lines
585 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { base } from "./base";
import { config } from "./config";
import { demo } from "./demo";
import { virtual } from "./virtual";
import type { Config } from "../types";
export function cool(options: Config.Options) {
// 应用类型admin | app
config.type = options.type;
// 请求地址
config.reqUrl = options.proxy["/dev/"].target;
// Eps
if (options.eps) {
const { dist, mapping } = options.eps;
if (dist) {
config.eps.dist = dist;
}
if (mapping) {
config.eps.mapping.unshift(...mapping);
}
}
return [base(), virtual(), demo(options.demo)];
}