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

Can I open a PR to create a "modernised" ESM-compliant build output? #229

Open
jkhaui opened this issue Jun 12, 2024 · 0 comments
Open

Can I open a PR to create a "modernised" ESM-compliant build output? #229

jkhaui opened this issue Jun 12, 2024 · 0 comments

Comments

@jkhaui
Copy link

jkhaui commented Jun 12, 2024

Thanks for this simple yet powerful package, it's a great idea and still gets the job done after these years! I'm wondering if there's any plans for releases in the near future?

For context, build tooling around ECMAScript modules has really matured the past couple of years (thanks to projects like Vite) and shows no signs of slowing. This is great for the long-term health of the JS ecosystem.

Would you accept a PR which basically generates a proper ESM build? This would let the code be properly statically analysable by rollup and similar build tools, allowing them to treeshake and minify the code as small as possible.
It's not like react-tracking takes up a lot of space, but when you host on CF workers with a 1mb bundle size limit, every kb counts...

I can't say exactly what needs to be changed yet. Just that I can see that using react-tracking causes prop-types and hoist-non-react-statics, as well as the entirety of react-tracking's source code (e.g. the HoC & decorators code which I never use), to be included in my final bundle.

If you're open to this, could also be an opportunity to replace prop-types with TS, maybe remove the HoC & decorator functions (don't think it's a common pattern anymore) and ship a major breaking update?

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

No branches or pull requests

1 participant