-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the latest Esbuild #108
Conversation
87a9943
to
1da5ec5
Compare
|
||
export type { ParseOptions } from './types' | ||
|
||
export default { ParserError, parse, tokenize, visit } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after some testing, this was only needed because we were importing a default value in prettier-plugin-solidity
if we change:
import parser from '@solidity-parser/parser';
to:
import { parse as solidityParserParse, visit } from '@solidity-parser/parser';
It works perfectly.
Up to you whether you wanna keep this change or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that default imports won't work anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I checked this locally and it works fine both with CJS and ESM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UMD file also works fine with HTML. I think we can merge this.
6a45e53
to
9b78ef0
Compare
2b7bee8
to
e69c6fa
Compare
af5fdf4
to
94dec27
Compare
7920a44
to
c5daa60
Compare
0de491a
to
c4acb5b
Compare
pushing past
[email protected]
has been tricky mainly because the output is automatically wrapped in a function that would add a__esModule: true
without us noticing and webpack would see this and automatically try to loadparser.default
which wasundefined
so after some detectiving I came up with this solution insrc/index.ts
.I also added a
browserlist
functionality to keep the file size similar to the oldesbuild
which did not add any Polyfill at all.