Skip to content

v0.6.0

Choose a tag to compare

@MonicaOlejniczak MonicaOlejniczak released this 10 May 01:19
· 43 commits to master since this release

New features

  • Update lazy to load outside of phases, so that it behaves like React.lazy (#65). This change means that the next phase does not need to be manually started, for a lazy component to load.
  • The original error from the loader is thrown instead of a custom LoaderError, improving both the stack trace and messaging in the console and other reporters (#68)
  • Add resolverOptions configuration option to the babel plugin (#69)
  • LazyComponent.preload now returns a cleanup function, that removes any inserted link tags (#70)
  • Add retry support for the loader, and introduce a global retry configuration option (#71)

Bug fixes

  • Fix init default value handling when called multiple times (#65)
  • Ensure lazyAfterPaint components do not render during the paint phase, when falling back to the loader preloading (#65)
  • Automatically resolve TypeScript files in the babel plugin, when it is referenced in a loader import without the .ts or .tsx suffix (#69)
  • Cleanup lazyAfterPaint preload links when the component unmounts (#70)

Breaking changes

  • The LoaderError export has been removed, which should have minimal usages as isLoaderError should always be preferred (#68)
  • Error handling now uses a Symbol internally, which will require a polyfill for unsupported browsers like IE11 (#68)