3 ms·
Npm won't allow you to require remote code from a user touched variable like the below. myRemoteLib = require(userGeneratedVariable)
by dangerface 5y ago
Npm won't allow you to require remote code from a user touched variable like the below.
myRemoteLib = require(userGeneratedVariable)
- eyelidlessness 5y agoI don’t know where you got that idea. NPM doesn’t have any say in CJS (or ESM) module resolution other than that they conform to relevant aspects of it. Node and other implementers of those module systems absolutely do allow dynamic require/import.