Added Parcel bundler compatibility with a new Why is this needed?
/background entry point for Chrome extensions.New Entry Point: /backgroundA lightweight entry point for Chrome extension background scripts:- Parcel’s web worker bundling requires specific import patterns
- The
/backgroundentry provides a minimal bundle optimized for background scripts - Avoids bundler compatibility issues with session recording dependencies
/background:HttpTransport- HTTP transport for API communicationcreateBackgroundHandler- Background script message handlerMESSAGE_TYPES- Message type constants- Type exports:
Transport,TransportConfigRequest,TransportResponse,ProjectConfig,CompositeEvent,SnapshotEvent
- Moved compression utilities to
core/utils/(backwards compatible via re-exports)
Session recording with Parcel has limited support. Use Webpack or Rsbuild for full session recording, or disable session recording when using Parcel.
Expanded session recording configuration options for greater control over privacy, performance, and recording behavior.Privacy & Masking
maskSelector- CSS selector for elements to mask text contentmaskTextClass- CSS class name for elements to mask text contentblockSelector- CSS selector for elements to block entirely from recordingblockClass- CSS class name for elements to block entirelyignoreSelector- CSS selector for elements to ignore (not record)ignoreClass- CSS class name for elements to ignoremaskAllInputs- Mask all text inputsmaskInputOptions- Granular input masking by input type (email, tel, password, etc.)maskInputFn- Custom function to mask input valuesmaskTextFn- Custom function to mask text content
recordCanvas- Record canvas elementsrecordCrossOriginIframes- Record cross-origin iframesinlineImages- Inline images as data URLscollectFonts- Collect web fontsinlineStylesheet- Inline stylesheetsrecordAfter- Control when recording starts (DOMContentLoadedorload)
sampling- Sampling strategy for different event typescheckoutEveryNth- Take a full DOM snapshot every N eventscheckoutEveryNms- Take a full DOM snapshot every N millisecondsslimDOMOptions- Reduce snapshot size by omitting scripts, comments, and meta tags
enableRecordingConsoleLog- Enable console log capturenetworkCapture- Enable network request capture with configurable options
Added support for bundlers with code splitting (Webpack, Rspack, etc.) in Chrome extension content scripts.Content Script Entry PointUsing a bundler with code splitting? Import from The
@composite-inc/composite-js/content-script instead of @composite-inc/composite-js:/content-script entry point pre-bundles all extensions synchronously, avoiding ChunkLoadError issues caused by dynamic imports in content scripts.Why is this needed?- Chrome extension content scripts run in an “isolated world”
- Bundlers load chunks via script tags that execute in the page’s main world
- The two worlds can’t communicate, causing chunk loading to fail
- This entry point includes all extensions upfront, avoiding dynamic imports
Initial release of Composite Analytics SDK documentation.