gitbeaker/packages/core/rollup.config.js
Justin Dalrymple 6a3292b033
Expose typing to consumer and remove export complexity (#1818)
- Exports all types
- Clean up type duplicates
- Remove Project,User and Group Bundles
- Fix typing on the Gitlab Export
- Clean up README.md
2021-07-05 15:34:19 -04:00

36 lines
804 B
JavaScript

import replace from '@rollup/plugin-replace';
import ts from 'rollup-plugin-typescript2';
import pkg from './package.json';
export default {
input: 'src/index.ts',
external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})],
output: [
{
file: pkg.main, // CommonJS (for Node) build.
format: 'cjs',
sourcemap: true,
},
{
file: pkg.module, // ES module (for bundlers) build.
format: 'es',
sourcemap: true,
},
],
plugins: [
replace({
'../../dist/map.json': './map.json',
delimiters: ['', ''],
preventAssignment: true,
}),
ts({
tsconfigOverride: {
compilerOptions: {
baseUrl: '.',
},
},
useTsconfigDeclarationDir: true,
}),
],
};