I have tried node-uuid before too. But I ended up writing mine like so:
var utilAPI={
createGuid:function(){
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
},
}
This I can fix. Disable builtins in the rollup configuration. See here for how to customize the rollup config, and provide one that just comments out the buildins() line.
@rapropos, thanks. I tried that, but unfortunately this doesn’t work.
rollup: Treating 'crypto' as external dependency
rollup: No name was provided for external module 'crypto' in options.globals – guessing 'crypto'
node-uuid relies on Crypto, but as far as I can tell disabling the builtins plugin means that transitive dependencies of npm modules are not loaded, which would explain why this fails. Right?