1.1.1 • Published 3 months ago

bundle-n-require v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Bundle n Require

Use this package to bundle and require a TypeScript file and its dependencies.

Installation

npm install --save bundle-n-require

Usage

import { bundleNRequire } from 'bundle-n-require'

const result = await bundleNRequire('path/to/entry.ts')
// => { mod, dependencies, code }
  • mod is the module that was required.
  • dependencies is an array of the modules that were required by the entry module.
  • code is the bundled code.