UNPKG

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