UNPKG

lbundle

Version:

Small zero-configuration bundler build on top of Rollup.js and SWC for NPM libraries

27 lines (24 loc) 793 B
import path from 'path'; const getRollupTypescriptConfig = (param)=>{ let { options, pkg, resolvedSource, tsconfigPath } = param; const declarationOptions = pkg.types ? { emitDeclarationOnly: true, declaration: true, declarationDir: path.resolve(options.cwd, path.dirname(pkg.types)) } : {}; return { tsconfig: tsconfigPath ?? false, rootDir: resolvedSource ? path.dirname(resolvedSource) : undefined, sourceMap: false, exclude: [ '**/__tests__/**', '**/*.test.*', '**/*.spec.*', '**/*.stories.*', '**/*.mock.*' ], ...declarationOptions }; }; export { getRollupTypescriptConfig }; //# sourceMappingURL=get-rollup-typescript-config.mjs.map