Wrangler failing to bundle dependencies

I want to use https://github.com/javascript-obfuscator/javascript-obfuscator library in my worker, but when I start it localy I get error:
✘ [ERROR] service core:user:my-worker: Uncaught ReferenceError: chance is not defined

at null.<anonymous> (index.js:4927:97)
at null.<anonymous> (index.js:4928:10) in 714
at null.<anonymous> (index.js:24311:21) in r
at null.<anonymous> (index.js:20775:64) in 4291
at null.<anonymous> (index.js:24311:21) in r
at null.<anonymous> (index.js:20531:61) in 5678
at null.<anonymous> (index.js:24311:21) in r
at null.<anonymous> (index.js:13319:61) in 5332
at null.<anonymous> (index.js:24311:21) in r
at null.<anonymous> (index.js:13109:313) in 9723
✘ [ERROR] service core:user:my-worker: Uncaught ReferenceError: chance is not defined

at null.<anonymous> (index.js:4927:97)
at null.<anonymous> (index.js:4928:10) in 714
at null.<anonymous> (index.js:24311:21) in r
at null.<anonymous> (index.js:20775:64) in 4291
at null.<anonymous> (index.js:24311:21) in r
at null.<anonymous> (index.js:20531:61) in 5678
at null.<anonymous> (index.js:24311:21) in r
at null.<anonymous> (index.js:13319:61) in 5332
at null.<anonymous> (index.js:24311:21) in r
at null.<anonymous> (index.js:13109:313) in 9723
As I understand, chance is a dependency of javascript-obfuscator, but I don't understand why it cannot be bundled. Would appreciate any help, thanks!
GitHub
GitHub - javascript-obfuscator/javascript-obfuscator: A powerful ob...
A powerful obfuscator for JavaScript and Node.js. Contribute to javascript-obfuscator/javascript-obfuscator development by creating an account on GitHub.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server