@tszip/cjs
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

ESM Require Shim

This script ensures that there is a valid require identifier in the global context so that an ES module can use it if needed and, more importantly, import dependencies which include references to require without throwing.

It only checks if globalThis.require is undefined, and if it is, it sets it to createRequire(import.meta.url).

Readme

Keywords

none

Package Sidebar

Install

npm i @tszip/cjs

Weekly Downloads

0

Version

1.5.0

License

MIT

Unpacked Size

2.75 kB

Total Files

9

Last publish

Collaborators

  • ctjlewis