Skip to content
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

Publish dual CJS and ESM version of react-error-overlay #3354

Closed
ovidiuch opened this issue Oct 30, 2017 · 3 comments
Closed

Publish dual CJS and ESM version of react-error-overlay #3354

ovidiuch opened this issue Oct 30, 2017 · 3 comments

Comments

@ovidiuch
Copy link
Contributor

Discussion started here: react-cosmos/react-cosmos#484 (comment)

@Timer's comment on this

We can dual publish a CJS and ESM version (based on package.json toggle). Can you open an issue on CRA for this please?

I've never done this before, but I think this means defining two different entry points in package.json:

  • main pointing to CJS
  • module pointing to ESM

Correct me if I'm wrong.

Let me know if you have any other pointers for how to structure the build script and if you think it's feasible for a first time contributor to CRA I'm happy to give it a shot!

@Timer
Copy link
Contributor

Timer commented Oct 31, 2017

@skidding hi!

You are correct, essentially we need a CJS version pointed to by main and a ESM version pointed to by module.

You can find the build.js script inside the react-error-overlay package and tune it to output both versions 😄.

@ovidiuch
Copy link
Contributor Author

I checked out master and it seems like this is already fixed in react-error-overlay@3.0.0. The published lib is an umd module.

Is there any reason to not use REO@3 here? I didn't find anything about this major upgrade in the CHANGELOG. Thanks!

@Timer
Copy link
Contributor

Timer commented Oct 31, 2017

Nope, you're correct! I forgot about our 3.0.0 timeline and it just so happened to come quickly. 😄

@Timer Timer closed this as completed Oct 31, 2017
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants