This commit is contained in:
Tw93
2025-08-16 22:37:08 +08:00
parent f76d567895
commit 6f9450d598
9 changed files with 653 additions and 147 deletions

2
rollup.config.js vendored
View File

@@ -7,6 +7,7 @@ import json from "@rollup/plugin-json";
import replace from "@rollup/plugin-replace";
import chalk from "chalk";
import { spawn, exec } from "child_process";
import fs from "fs";
const isProduction = process.env.NODE_ENV === "production";
const devPlugins = !isProduction ? [pakeCliDevPlugin()] : [];
@@ -48,7 +49,6 @@ function pakeCliDevPlugin() {
// 智能检测包管理器
const detectPackageManager = () => {
const fs = require("fs");
if (fs.existsSync("pnpm-lock.yaml")) return "pnpm";
if (fs.existsSync("yarn.lock")) return "yarn";
return "npm";