solidity-parser / parser

A Solidity parser for JS built on top of a robust ANTLR4 grammar
MIT License
157 stars 44 forks source link

add exports to package.json to support usage in esm #85

Closed alvrs closed 11 months ago

alvrs commented 1 year ago
fvictorio commented 11 months ago

Hi @alvrs, thanks for this (and sorry for taking so long to respond). I gave this a try locally but this is not working, even after some modifications. I think the reason is that the generated antlr code uses some dynamic requires that are not supported by esbuild.

I'm not super sure what to do about this. Maybe we should only use esbuild for the browser build, and just tsc to generate the cjs and esm builds? I'm not sure. For the time being, I opened this issue about it so we can discuss it further there.