Skip to content

Support for synchronous/module-based loading

Compare
Choose a tag to compare
@tdumitrescu tdumitrescu released this 09 Oct 20:54
· 1037 commits to master since this release

Four pre-built release types are now available in the build/ dir:

  • mixpanel.globals.js: the standard "global var" build. Attaches mixpanel object to window, requires loading via asynchronous embed code (snippet)
  • mixpanel.amd.js: for loading via AMD/RequireJS
  • mixpanel.cjs.js: for loading with a CommonJS loader such as Webpack or Browserify
  • mixpanel.umd.js: UMD build, both AMD- and CJS-compatible

Additionally, those who already compile/bundle from ES2015 source can load mixpanel directly from source in src/loader-module.js (import mixpanel from 'mixpanel/src/loader-module';).

Usage examples are available in the examples/ dir.