mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-04 06:09:29 +08:00
15 lines
296 B
Text
15 lines
296 B
Text
function onError (err) {
|
|
throw err /* ↓ Check stack trace ↓ */
|
|
}
|
|
|
|
module.exports = function (filename, opts) {
|
|
const jiti = require('../dist/jiti')
|
|
|
|
opts = { onError, ...opts }
|
|
|
|
if (!opts.transform) {
|
|
opts.transform = require('../dist/babel')
|
|
}
|
|
|
|
return jiti(filename, opts)
|
|
}
|