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

Add esm build using microbundle-crl #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anver
Copy link
Contributor

@anver anver commented Feb 16, 2022

The previous fix will not actually work for cra and custom webpack setup, since react app mostly use esm imports as well this package is not meant for server side rendering, esm will be quiet helpful. I've made a change so that the microbundle-crl will generate esm build files. I've tried to generate both esm and cjs bundles but unfortunately it's not working on microbundle-crl. It should be a breeze when using esbuild.

This will actually fix the module not exported error for many users. I confirmed it several times before the PR

microbundle-crl script is generating only cjs build

This causes issues on the latest cra as well as custom build setup
@cuongdevjs
Copy link
Owner

Thank you for your contribution. I'll check it.

@cuongdevjs cuongdevjs self-assigned this Feb 17, 2022
Copy link
Owner

@cuongdevjs cuongdevjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. Why do we need to change this? I've installed 2.0.1 our lib on my machine with CRA, I saw it work fine. I don't know why need this.

@anver
Copy link
Contributor Author

anver commented Feb 17, 2022

Hi. Why do we need to change this? I've installed 2.0.1 our lib on my machine with CRA, I saw it work fine. I don't know why need this.

This is needed since the build is generating only cjs version which is mostly used on node servers since this library will be used 99% on client-side, most of the users need esm version which is what I have done and works on all setup.

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.

2 participants