All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.lib.jiti.mjs Maven / Gradle / Ivy

The newest version!
import { createRequire } from "node:module";
import _createJiti from "../dist/jiti.cjs";
import transform from "../dist/babel.cjs";

function onError(err) {
  throw err; /* ↓ Check stack trace ↓ */
}

const nativeImport = (id) => import(id);

export function createJiti(id, opts = {}) {
  if (!opts.transform) {
    opts = { ...opts, transform };
  }
  return _createJiti(id, opts, {
    onError,
    nativeImport,
    createRequire,
  });
}

export default createJiti;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy