Skip to content

Support extension of untranspiled classes

Compare
Choose a tag to compare
@vzaidman vzaidman released this 19 Jan 12:01
· 397 commits to master since this release

The bug #5, where people got Class constructors must be invoked with 'new' was identified as caused by extension of native "class" object types.

We added the targets:

  "main-no-classes-transpile": "dist/no-classes-transpile/cjs/whyDidYouRender.min.js",
  "module-no-classes-transpile": "dist/no-classes-transpile/esm/whyDidYouRender.min.js",
  "browser-no-classes-transpile": "dist/no-classes-transpile/umd/whyDidYouRender.min.js"

and now imports similar to

  const whyDidYouRender = require('@welldone-software/why-did-you-render/dist/no-classes-transpile/umd/whyDidYouRender.min.js');

where classes are used without transpilation.

Also, upgraded all packages to their latest version, including rollup v1.1.0.