File tree Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 46
46
},
47
47
"homepage" : " https://docs.sentry.io/platforms/javascript/session-replay/" ,
48
48
"devDependencies" : {
49
+ "@rollup/plugin-commonjs" : " ^21.0.1" ,
49
50
"@types/pako" : " ^2.0.0"
50
51
},
51
52
"dependencies" : {
52
- "@rollup/plugin-commonjs" : " 25.0.7" ,
53
53
"pako" : " 2.1.0"
54
54
},
55
55
"engines" : {
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ import type * as PakoTypes from 'pako';
2
2
// @ts -expect-error no types here
3
3
import * as pako from 'pako/lib/deflate.js' ;
4
4
5
+ // NOTE: We have to do this weird workaround because by default,
6
+ // pako does not treeshake when importing from 'pako'.
7
+ // In order to get proper tree shaking, we have to import from 'pako/lib/deflate.js',
8
+ // Which is not great but works
9
+ // types come from @types /pako, so we can safely use them by casting
5
10
const Deflate = ( pako as typeof PakoTypes ) . Deflate ;
6
11
const deflate = ( pako as typeof PakoTypes ) . deflate ;
7
12
const constants = ( pako as typeof PakoTypes ) . constants ;
Original file line number Diff line number Diff line change 4753
4753
is-reference "1.2.1"
4754
4754
magic-string "^0.27.0"
4755
4755
4756
-
4757
- version "25.0.7"
4758
- resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz#145cec7589ad952171aeb6a585bbeabd0fd3b4cf"
4759
- integrity sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==
4760
- dependencies:
4761
- "@rollup/pluginutils" "^5.0.1"
4762
- commondir "^1.0.1"
4763
- estree-walker "^2.0.2"
4764
- glob "^8.0.3"
4765
- is-reference "1.2.1"
4766
- magic-string "^0.30.3"
4767
-
4768
4756
"@rollup/plugin-commonjs@^15.0.0":
4769
4757
version "15.1.0"
4770
4758
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-15.1.0.tgz#1e7d076c4f1b2abf7e65248570e555defc37c238"
You can’t perform that action at this time.
0 commit comments