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 4646 },
4747 "homepage" : " https://docs.sentry.io/platforms/javascript/session-replay/" ,
4848 "devDependencies" : {
49+ "@rollup/plugin-commonjs" : " ^21.0.1" ,
4950 "@types/pako" : " ^2.0.0"
5051 },
5152 "dependencies" : {
52- "@rollup/plugin-commonjs" : " 25.0.7" ,
5353 "pako" : " 2.1.0"
5454 },
5555 "engines" : {
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ import type * as PakoTypes from 'pako';
22// @ts -expect-error no types here
33import * as pako from 'pako/lib/deflate.js' ;
44
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
510const Deflate = ( pako as typeof PakoTypes ) . Deflate ;
611const deflate = ( pako as typeof PakoTypes ) . deflate ;
712const constants = ( pako as typeof PakoTypes ) . constants ;
Original file line number Diff line number Diff line change 47534753 is-reference "1.2.1"
47544754 magic-string "^0.27.0"
47554755
4756- "@rollup/plugin-commonjs@25.0.7":
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-
47684756"@rollup/plugin-commonjs@^15.0.0":
47694757 version "15.1.0"
47704758 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