File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
packages/instrumentation-chromadb Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 66 "types" : " dist/src/index.d.ts" ,
77 "repository" : " traceloop/openllmetry-js" ,
88 "scripts" : {
9- "build" : " tsc --build tsconfig.json " ,
9+ "build" : " rollup -c " ,
1010 "lint" : " eslint . --ext .ts" ,
1111 "lint:fix" : " eslint . --ext .ts --fix" ,
1212 "test" : " ts-mocha -p tsconfig.json 'tests/**/*.test.ts' --timeout 20000"
Original file line number Diff line number Diff line change 1+ const dts = require ( "rollup-plugin-dts" ) ;
2+ const typescript = require ( "@rollup/plugin-typescript" ) ;
3+ const json = require ( "@rollup/plugin-json" ) ;
4+
5+ // eslint-disable-next-line @typescript-eslint/no-var-requires
6+ const name = require ( "./package.json" ) . main . replace ( / \. j s $ / , "" ) ;
7+
8+ const bundle = ( config ) => ( {
9+ ...config ,
10+ input : "src/index.ts" ,
11+ external : ( id ) => ! / ^ [ . / ] / . test ( id ) ,
12+ } ) ;
13+
14+ exports . default = [
15+ bundle ( {
16+ plugins : [ typescript . default ( ) , json . default ( ) ] ,
17+ output : [
18+ {
19+ file : `${ name } .js` ,
20+ format : "cjs" ,
21+ sourcemap : true ,
22+ } ,
23+ {
24+ file : `${ name } .mjs` ,
25+ format : "es" ,
26+ sourcemap : true ,
27+ } ,
28+ ] ,
29+ } ) ,
30+ bundle ( {
31+ plugins : [ dts . default ( ) ] ,
32+ output : {
33+ file : `${ name } .d.ts` ,
34+ format : "es" ,
35+ } ,
36+ } ) ,
37+ ] ;
You can’t perform that action at this time.
0 commit comments