Seems like we should be using optional chaining syntax (?.) in the loader source code now that it is stage 4 and well-supported. At the time when this was written, that language feature was relatively new and not yet generally available.
See:
|
if (typeof original === 'function') { |
|
module.exports.default = function() { |
|
return original.apply(this, arguments); |
|
}; |
|
} else { |
|
module.exports.default = original; |
Seems like we should be using optional chaining syntax (
?.) in the loader source code now that it is stage 4 and well-supported. At the time when this was written, that language feature was relatively new and not yet generally available.See:
loader339/sample/load-sample.mjs
Lines 56 to 61 in 8260406