Currently we do a common.js check that includes testing the existence of module.exports but this property is node specific and does follow the common.js modules specification.
This prevents common.js compliant environments such as Wakanda to use plates. An easy fix would be changing:
The change here is to check against module.id instead of module.exports. The module.id is required by the common.js specification and exists in Node.js and other common.js environments.
edit Testing against a require.paths would not work either, as support for that has been removed in the current node versions.
Currently we do a common.js check that includes testing the existence of
module.exports
but this property is node specific and does follow the common.js modules specification.This prevents common.js compliant environments such as Wakanda to use plates. An easy fix would be changing:
In to:
The change here is to check against
module.id
instead ofmodule.exports
. Themodule.id
is required by the common.js specification and exists in Node.js and other common.js environments.edit Testing against a
require.paths
would not work either, as support for that has been removed in the current node versions.