Closed xobotyi closed 11 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
8634836
) 99.62% compared to head (0577c1f
) 99.62%. Report is 37 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:tada: This PR is included in version 24.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
As part of migration to react 18 and docosaurus - i made a decision to switch package to
"type": "module"
.By itself it leads to following BREAKING CHANGES:
ESNext
and ESM module resolution. There is no more sense to distribute CJS version as package is ESM-only.Consequent of above - no more
esm
andcjs
subfolders - hooks are importable fromindex.js
or its own directory which don't have a prefix anymore, thanks toexports
directive. All of below examples will lead to same result, choose any on your taste:import { useFirstMountState } from '@react-hookz/web';
import { useFirstMountState } from '@react-hookz/web/';
import { useFirstMountState } from '@react-hookz/web/useFirstMountState/';
import { useFirstMountState } from '@react-hookz/web/useFirstMountState/index.js';
Thought is seems not to have subfolder, it is only due to
exports
directive, in real it is@react-hookz/web/dist/useFirstMountState/index.js
.imports
directive to define path alias#root
- it stays so even in distributed code, thus, some may be affected in case their bundler configured to somehow handle such alias. Those developer shoud configure import rewriter not to handlenode_modules
or@react-hookz/web
package exclusively.Side-effect for current PR - documentation is broken, as storybook 6 is not working within ESM packages and Im planning to switch to docosaurus anyways.