@salesforce/lazy-require
TypeScript icon, indicating that this package has built-in type declarations

0.4.21 • Public • Published

@salesforce/lazy-require

A Node library for lazily loading commonjs modules in order to speed up application execution time.

Note that not all modules are well-suited for lazy loading -- some modules expect to run essential initialization code in addition to exporting types when loaded (BAD!). Modules that do this should not be lazily loaded, or undefined results are likely to occur in your application. Use with care (that is, make sure your app is well tested before using this in production).

Usage

TypeScript

JavaScript

// Enable lazy loading of modules
const lazyLoad = require('@salesforce/lazy-require').default.create('name-of-typecache');
lazyLoad.start();

Readme

Keywords

none

Package Sidebar

Install

npm i @salesforce/lazy-require

Weekly Downloads

6,123

Version

0.4.21

License

BSD-3-Clause

Unpacked Size

30.9 kB

Total Files

15

Last publish

Collaborators

  • dme722
  • nolanlawson
  • ire-npm-team-user
  • jburnie
  • abirchfieldsfdc
  • dlouvton
  • mobify
  • jmsjtu
  • jasonschroeder-sfdc
  • packagellama
  • maward
  • danielshox
  • duane.chew
  • dferro
  • jcourtner
  • jye-sf
  • adirasanam
  • hkii
  • iamaziz
  • dbreese-salesforce
  • ashokrudraraju
  • dhersam
  • demianbrecht
  • mbettio
  • damilareolowoniyi
  • mmadialagan
  • mjrust
  • salesforce-releases
  • mpsenn
  • kevinv11n
  • byao
  • pmdartus
  • ekashida
  • gr8gatsby
  • ravi.jayaramappa
  • apapko
  • jleen-sfdc
  • jqian
  • cwallsf
  • dhagberg-sf
  • khawkins
  • amphro
  • jodarove
  • sfdctaka
  • fernomac
  • jimjag
  • ivarley
  • jbartolotta-sfdc