8 lines
248 B
JavaScript
8 lines
248 B
JavaScript
if (typeof require.addon === 'function') {
|
|
module.exports = require.addon.bind(require)
|
|
} else {
|
|
module.exports = function addon(specifier, parentURL) {
|
|
throw new Error(`Cannot find addon '${specifier}' imported from '${parentURL}'`)
|
|
}
|
|
}
|