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

simplify exports #379

Merged
merged 2 commits into from
Jun 17, 2024
Merged

simplify exports #379

merged 2 commits into from
Jun 17, 2024

Conversation

mixmix
Copy link
Contributor

@mixmix mixmix commented Jun 12, 2024

This PR:

  • 🔥 cuts off some exports that weren't used
  • introduces simple files in root of project which handle routing to correct files

tests/import.test.mjs Outdated Show resolved Hide resolved
@mixmix
Copy link
Contributor Author

mixmix commented Jun 12, 2024

@frankiebee here's the minimal start to our TS work

@mixmix
Copy link
Contributor Author

mixmix commented Jun 12, 2024

I tried testing the export by linking with CLI but I'm not confident yarn is linking ... EOD 💀

@mixmix
Copy link
Contributor Author

mixmix commented Jun 12, 2024

Ok tests passing, but here's the thing we need to watch: I only defined exports for import and require
I did not define a default - this is needed for when import nor require is used / it's an environment where those don't make sense? I removed that cos it was breaking require/import tests. I think this is fine... I guess we'll see later?

@mixmix
Copy link
Contributor Author

mixmix commented Jun 12, 2024

type: module just signals what module system this packages is running (ESM/ CJS), I don't think it's about "is this an application" etc. I'm in favour of leaning towards type: module as our default because ESM will slowly win, and it's better for bundling etc (tree shaking easier with esm?)

@mixmix mixmix merged commit 0800f49 into main Jun 17, 2024
1 check passed
@mixmix mixmix deleted the mixmix/cjs_mjs_roots branch June 17, 2024 23:32
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.

None yet

2 participants