UNPKG

beesbuild

Version:

构建工具链

14 lines (13 loc) 436 B
import commonjs from "@rollup/plugin-commonjs"; import { mergeWith } from "lodash-unified"; import { DEFAULT_EXTENSIONS } from "../../variables.mjs"; function commonjsPlugin(option, ctx) { if ((option != null ? option : false) === false) return []; if (typeof option === "boolean") { option = {}; } return commonjs(mergeWith({ extensions: DEFAULT_EXTENSIONS }, option != null ? option : {})); } export { commonjsPlugin };