Files
SnowLuma/.pnpm-store/v11/files/01/ced5af9f089398842bf32e4c77479f5a0e9e0043c759745e34761e31c0ea132c0f127c27fd202f259b0ef09f48aa3a958913ab2f2ae0832323208679e12be5
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

22 lines
786 B
Plaintext

import { i as internalFixDefaultCJSExports } from './utils-DwzdDEfz.mjs';
import 'magic-string';
import 'mlly';
function cjsExportsDtsMatcher(info) {
return info.type === "chunk" && info.exports?.length > 0 && info.exports.includes("default") && /\.d\.c?ts$/.test(info.fileName);
}
function defaultCjsExportsDtsMatcher(info) {
return cjsExportsDtsMatcher(info) && info.isEntry;
}
function FixDtsDefaultCjsExportsPlugin(options = {}) {
const { matcher = defaultCjsExportsDtsMatcher } = options;
return {
name: "fix-dts-default-cjs-exports-plugin",
renderChunk(code, info) {
return matcher(info) ? internalFixDefaultCJSExports(code, info, options) : void 0;
}
};
}
export { FixDtsDefaultCjsExportsPlugin, cjsExportsDtsMatcher, defaultCjsExportsDtsMatcher };