File tree 4 files changed +310
-12
lines changed
4 files changed +310
-12
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " webrtc-issue-detector" ,
3
3
"version" : " 1.0.8" ,
4
4
"description" : " WebRTC diagnostic tool that detects issues with network or user devices" ,
5
- "main" : " dist/index.js" ,
5
+ "main" : " dist/bundle-cjs.js" ,
6
+ "module" : " dist/bundle-esm.js" ,
6
7
"types" : " dist/index.d.ts" ,
7
- "typings" : " dist/index" ,
8
8
"repository" :
" [email protected] :VLprojects/webrtc-issue-detector.git" ,
9
9
"author" :
" Roman Kuzakov <[email protected] >" ,
10
10
"license" : " MIT" ,
17
17
" dist/"
18
18
],
19
19
"scripts" : {
20
- "build" : " tsc " ,
20
+ "build" : " rm -rf dist && rollup -c " ,
21
21
"lint" : " eslint ./src" ,
22
22
"test" : " NODE_ENV=test mocha --config test/utils/runners/mocha/.mocharc.js"
23
23
},
24
24
"devDependencies" : {
25
+ "@rollup/plugin-typescript" : " ^8.3.4" ,
25
26
"@types/chai" : " ^4.3.3" ,
26
27
"@types/chai-as-promised" : " ^7.1.5" ,
27
28
"@types/chai-subset" : " ^1.3.3" ,
42
43
"eslint-plugin-jsx-a11y" : " ^6.6.1" ,
43
44
"faker" : " ^5.5.3" ,
44
45
"mocha" : " ^10.0.0" ,
46
+ "rollup" : " ^2.78.0" ,
47
+ "rollup-plugin-bundle-size" : " ^1.0.3" ,
48
+ "rollup-plugin-polyfill-node" : " ^0.10.2" ,
49
+ "rollup-plugin-terser" : " ^7.0.2" ,
45
50
"sinon" : " ^14.0.0" ,
46
51
"sinon-chai" : " ^3.7.0" ,
47
52
"ts-node" : " ^10.9.1" ,
Original file line number Diff line number Diff line change
1
+ import typescript from '@rollup/plugin-typescript' ;
2
+ import { terser } from 'rollup-plugin-terser' ;
3
+ import nodePolyfills from 'rollup-plugin-polyfill-node' ;
4
+ import bundleSize from 'rollup-plugin-bundle-size' ;
5
+
6
+ export default {
7
+ input : 'src/index.ts' ,
8
+ output : [
9
+ {
10
+ file : './dist/bundle-esm.js' ,
11
+ format : 'es' ,
12
+ } ,
13
+ {
14
+ file : './dist/bundle-cjs.js' ,
15
+ format : 'cjs' ,
16
+ exports : 'named' ,
17
+ } ,
18
+ ] ,
19
+ plugins : [
20
+ nodePolyfills ( { include : [ 'events' ] } ) ,
21
+ typescript ( ) ,
22
+ terser ( ) ,
23
+ bundleSize ( ) ,
24
+ ] ,
25
+ } ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
- "module" : " commonjs " ,
4
- "target" : " es6 " ,
3
+ "module" : " esnext " ,
4
+ "target" : " esnext " ,
5
5
"lib" : [
6
6
" dom" ,
7
7
" dom.iterable" ,
16
16
"include" : [
17
17
" src/index.ts" ,
18
18
" src/**/*"
19
- ]
19
+ , " rollup.config.js " ]
20
20
}
You can’t perform that action at this time.
0 commit comments