Files
SnowLuma/.pnpm-store/v11/files/10/536a75613d2a1fd879bc6e24a48ceb4fac28af5754bed38a9cc4ce40e3f0623f75a89162ef6ea919b5c6a63a5764d71968ce269afea65b6041b57b04d39353
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

22 lines
785 B
Plaintext

import { i as internalFixDefaultCJSExports } from './utils-DwzdDEfz.js';
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 };