diff --git a/src/screen.ts b/src/screen.ts index 0b3cc8c8..9034b159 100644 --- a/src/screen.ts +++ b/src/screen.ts @@ -1,4 +1,6 @@ -import {compressToEncodedURIComponent} from 'lz-string' +// WARNING: `lz-string` only has a default export but statically we assume named exports are allowd +// TODO: Statically verify we don't rely on NodeJS implicit named imports. +import lzString from 'lz-string' import type {OptionsReceived} from 'pretty-format' import {getQueriesForElement} from './get-queries-for-element' import {getDocument} from './helpers' @@ -12,7 +14,7 @@ function unindent(string: string) { } function encode(value: string) { - return compressToEncodedURIComponent(unindent(value)) + return lzString.compressToEncodedURIComponent(unindent(value)) } function getPlaygroundUrl(markup: string) {