index.js 296 B

123456789101112131415
  1. function onError (err) {
  2. throw err /* ↓ Check stack trace ↓ */
  3. }
  4. module.exports = function (filename, opts) {
  5. const jiti = require('../dist/jiti')
  6. opts = { onError, ...opts }
  7. if (!opts.transform) {
  8. opts.transform = require('../dist/babel')
  9. }
  10. return jiti(filename, opts)
  11. }