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

Fix @purduehackers/time/react exports #14

Merged
merged 3 commits into from
Nov 16, 2023
Merged

Fix @purduehackers/time/react exports #14

merged 3 commits into from
Nov 16, 2023

Conversation

MatthewStanciu
Copy link
Member

TIL after publishing v0.6.0 that TypeScript didn't support exports in package.json until very recently, and many projects wouldn't be able to use @purduehackers/time/react without upgrading TypeScript and changing moduleResolution to nodenext or bundler in their tsconfig.

I missed this during local testing because I tested it with create-next-app, which set moduleResolution to bundler by default. But it started breaking on some of my older projects, and in one of them when I set moduleResolution to bundler, it broke another package that had exported its types incorrectly & didn't work with bundler 🤦‍♂️

This PR attempts to make @purduehackers/time/react compatible with whatever moduleResolution your heart desires. Thank you to this article for the help.

It works when testing locally so I'm going to merge, but I'm not sure if it'll break again on some of my older projects. If it's broken I'll fix it. The great thing about writing a PR that nobody will read for an npm package that nobody will use is that I can just break shit and cut a new release whenever I want!

@MatthewStanciu MatthewStanciu merged commit 3a18c82 into main Nov 16, 2023
@MatthewStanciu MatthewStanciu deleted the fix-exports branch November 16, 2023 21:36
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.

1 participant