fix: Change package type
back to default of "commonjs"
#331
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #329
This PR removes the
"type": "module"
config from thepackage.json
, in order to fix the path that Jest is pulling the package from. I'm not really an expert on Jest and where it pulls it's imports from, but the issue #329 appears to be caused by a mismatch of ESM and CJS imports. The goal ofv4.9
was really to enable ESM imports in general, and this still works without using themodule
type, because the ESM version is pulled using theexports
field (if the environment is setup correctly).So, after changing the
type
back tocommonjs
(by just removing it,commonjs
is the default), the fix with the consistent IDs (#298) still appears to work fine for me in my test environment, so I'm fine with this approach. Plus, this actually better matches the package exports for bothreact-select
and@chakra-ui/react
, which I generally try and align with as much as possible, so that's a plus.I tested this against the test file provided by @hatajoe and have verified that the test runs fine after this change.