@boost/module

v5.0.0
Module resolving and loading utilities with TypeScript support.
boost module cjs mjs typescript

Modules - Boost

build status npm version

Load and resolve custom file types at runtime with a more powerful Node.js require replacement.

import { requireModule } from '@boost/module';

const result = requireModule('./some/non-js/file.ts');

Or with next-generation Node.js hooks.

node --import @boost/module/register ./path/to/entry-point.mjs

Features

  • CommonJS based importing with requireModule()
  • CommonJS interoperability with ESM-like files
  • ECMAScript module based importing with a custom Node.js hook
  • Supported file types: TypeScript

Installation

yarn add @boost/module

Documentation

npm i @boost/module

Metadata

  • MIT
  • >=18.12.0
  • Miles Johnson
  • released 3/1/2024

Downloads

Maintainers