-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathrollup.config.js
More file actions
43 lines (41 loc) · 1.13 KB
/
rollup.config.js
File metadata and controls
43 lines (41 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import typescript from '@rollup/plugin-typescript'
import json from '@rollup/plugin-json'
import { dts } from 'rollup-plugin-dts'
import { babel } from '@rollup/plugin-babel'
import { codecovRollupPlugin } from '@codecov/rollup-plugin'
import { config } from 'dotenv'
config({ path: '../../.env' })
export default [
{
input: './src/index.ts',
external: ['ms'],
output: [
{ file: './dist/index.cjs', format: 'cjs' },
{ file: './dist/index.mjs', format: 'es' }
],
plugins: [
typescript(),
json(),
babel({
extensions: ['.ts'],
plugins: ['@babel/plugin-syntax-import-attributes'],
babelHelpers: 'bundled',
presets: ['@babel/preset-env']
}),
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: 'agent-kit-common',
uploadToken: process.env.CODECOV_TOKEN,
debug: true,
uploadOverrides: {
sha: process.env.GH_COMMIT_SHA
}
})
]
},
{
input: './src/index.ts',
output: [{ file: './dist/index.d.ts', format: 'es' }],
plugins: [dts()]
}
]