UNPKG

@segment/analytics-next

Version:

Analytics Next (aka Analytics 2.0) is the latest version of Segment’s JavaScript SDK - enabling you to send your data to any tool without having to learn, test, or use a new API every time.

17 lines (13 loc) 498 B
import { Analytics } from '../../core/analytics' export async function loadLegacyVideoPlugins( analytics: Analytics ): Promise<void> { const plugins = await import( // @ts-expect-error '@segment/analytics.js-video-plugins/dist/index.umd.js' ) // This is super gross, but we need to support the `window.analytics.plugins` namespace // that is linked in the segment docs in order to be backwards compatible with ajs-classic // @ts-expect-error analytics._plugins = plugins }