Skip to content

Conversation

@ardatan
Copy link
Member

@ardatan ardatan commented Sep 4, 2020

No description provided.

@ardatan ardatan force-pushed the support-multiple-dist branch from 101f326 to 227a048 Compare June 8, 2021 11:16
@ardatan ardatan changed the title Support multiple dist configurations Support multiple dist configurations and ESM Jun 8, 2021
@ardatan ardatan marked this pull request as ready for review June 8, 2021 12:07
Comment on lines +22 to +25
dists?: {
distDir: string;
distPath?: string;
}[]
Copy link
Collaborator

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

Copy link
Collaborator

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?

Copy link
Member Author

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

Copy link
Collaborator

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?

Copy link
Member Author

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.

Copy link
Member Author

@ardatan ardatan Jun 8, 2021

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.

Copy link
Collaborator

@kamilkisiela kamilkisiela Jun 8, 2021

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

Copy link
Collaborator

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

@kamilkisiela kamilkisiela merged commit 9e72e67 into graphql-hive:master Jun 9, 2021
pkg.module,
"dist/index.esm.js",
`${name}: 'module' should equal 'dist/index.esm.js'`,
"dist/index.msj",
Copy link
Member Author

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

Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants