-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support multiple dist configurations and ESM #13
Support multiple dist configurations and ESM #13
Conversation
101f326
to
227a048
Compare
dists?: { | ||
distDir: string; | ||
distPath?: string; | ||
}[] |
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.
Do we need this or could we maybe have cjs
, esm
, nodeEsm
flags? @ardatan
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.
what's the story behind dists
?
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.
Having es5 builds for graphql-tools
https://github.com/ardatan/graphql-tools/blob/master/bob.config.js#L9
We have needed that before in MSTeams
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.
oh, so it's an output from tsc
?
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.
Yes it is actually. https://github.com/ardatan/graphql-tools/blob/master/package.json#L10
Here we run tsc twice in parallel, one is for modern es and the other one is for es5.
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.
I am not sure this old solution is the best but it worked for MSTeams :D It was a long time ago, we can change it for sure. But that was the reason behind having this dists
thing.
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.
@kamilkisiela @kamilkisiela (for me) add nodeEsm flag to the PR and merge it
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.
(also for me) update validation rules in bob validate to make sure it’s in sync
onError | ||
); | ||
shouldEqual( | ||
pkg.module, | ||
"dist/index.esm.js", | ||
`${name}: 'module' should equal 'dist/index.esm.js'`, | ||
"dist/index.msj", |
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.
I think this is typo :D
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.
I think so too! :D
No description provided.