1.1.0 • Published 2 years ago

@launchbadge/protobufjs-inquire v1.1.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

@protobufjs/inquire

npm

Requires a module only if available and hides the require call from bundlers.

API

  • inquire(moduleName: string): ?Object Requires a module only if available.

Browser Bundler Compatibility

Inquire can be used in browser modules if these configurations are set: 1) If a bundler is used, all modules loaded with inquire() must be added to the bundle config field "externals". This is supported by webpack, browserify (gulp), rollup, and possibly others. 2) When used in node/npm packages for distribution (including protobufjs) all modules loaded with inquire() must be ignored in the package.json browser option. This is also supported by webpack, browserify and rollup.

License: BSD 3-Clause License