Replies: 1 comment 1 reply
-
|
Pretty sure sure this is a Vite-specific issue, might just switch to a different frontend framework for now. :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hiya @ricmoo, I'm building a fun library to extract some attributes from EVM bytecode (such as function selectors) and it has been super convenient to use your experimental
asmpackage (particularly the Opcodes set, and thedisassemblehelper).Unfortunately I noticed that some of the code makes assumptions that it's a command-line library rather than a browser-runnable one, so I'm having trouble getting it to build in my demo frontend using Vite. My browser js packaging-fu is weak so maybe it's just me, but the symptom is errors like
'dirname' is not exported by __vite-browser-externalwhich stack traces to@ethersproject/asm.I pulled in a local fork of just
opcodes.tsand the relevant helper, and that's working for me, so I'm wondering which approach you'd prefer?dirnameso that it still builds for browser targets?asmpackage to make it usable as an in-browser library by pulling out the cli-specific stuff?Edit: I have a feeling this is mostly a failure of my bundling process, any protips appreciated. :)
Beta Was this translation helpful? Give feedback.
All reactions