adamhalasz / uniqid

Unique ID Generator
https://adamhalasz.com
617 stars 49 forks source link

v5.1.0 throwing error on IE11 #32

Closed eragon512 closed 4 years ago

eragon512 commented 4 years ago

Bundling uniqid@5.1.0 in a browser-side application causes the application to fail loading on IE11.

afsal008 commented 4 years ago

Hi @adamhalasz When building app in ubuntu, uniqid plugins exports are with default parameters

//  Exports
// ================================================
module.exports = module.exports.default = function(prefix = '', suffix = ''){ return prefix + address + pid + now().toString(36) + suffix; }
module.exports.process = function(prefix = '', suffix = ''){ return prefix + pid + now().toString(36) + suffix; }
module.exports.time    = function(prefix = '', suffix = ''){ return prefix + now().toString(36) + suffix; }

When building in Windows no such issue. Could you please get me some help?

ValentinCreative commented 4 years ago

Same issue here building with mac os, had to downgrade uniqid.

HernanGH commented 4 years ago

Same issue with uniqid@5.1.0

diogofscmariano commented 4 years ago

This happening because the module is not offering a transpiled version, and this was caused by: https://github.com/adamhalasz/uniqid/pull/21. On my side I added the webpack configuration to transpile this module, through exclude: /node_modules\/(?!(uniqid)\/).*/,. This is the rule we generally use, avoiding the transpilation of everything inside node_modules

Inveth commented 4 years ago

Happens to me too - should we roll back to some previous version?

HernanGH commented 4 years ago

Yes, I roll back at version 4.4.1

Inveth commented 4 years ago

Thanks @adamhalasz for updating -> bundles just fine now.

adamhalasz commented 4 years ago

Glad to hear it’s working now! :) Thanks for the fix @nick-smit