Files
rrweb/packages/packer/src/pack.ts
Justin Halsall a756a45aaf Improve development tooling (#1516)
- Running `yarn build` in a `packages/*/` directory will trigger build of all dependencies too, and cache them if possible.
- Fix for `yarn dev` breaking for `rrweb` package whenever changing files in `rrweb` package
- Update typescript, turbo, vite and vite-plugin-dts
- Require `workspaces-to-typescript-project-references` from `prepublish`
2024-06-21 18:13:53 +01:00

12 lines
340 B
TypeScript

import { strFromU8, strToU8, zlibSync } from 'fflate';
import type { PackFn } from '@rrweb/types';
import { type eventWithTimeAndPacker, MARK } from './base';
export const pack: PackFn = (event) => {
const _e: eventWithTimeAndPacker = {
...event,
v: MARK,
};
return strFromU8(zlibSync(strToU8(JSON.stringify(_e))), true);
};