Commit b157173
authored
fix(endpoint-cache): reduce bundle size (#2400)
mnemonist is a pretty big commonjs package, which is currently included
IN FULL from the endpoint-cache package. This is less than ideal when
using the sdk on the frontend side, since it adds about 270kb to the
bundle (before minification).
Since only the LRU-Cache is needed, changing the import to directly
target the lru-cache module helps bundlers tree shake correctly,
reducing the included code to about 15kb.1 parent 6fa9c67 commit b157173
File tree
2 files changed
+3
-3
lines changed- packages/endpoint-cache/src
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments