web icon indicating copy to clipboard operation
web copied to clipboard

cjs useCookieValue will include whole react-hookz rather than just one hooks

Open vip30 opened this issue 3 years ago • 0 comments

What is the current behavior?

Included whole lib in the bundle

Steps to Reproduce

  1. one of the file using import { useCookieValue } from "@react-hookz/web/cjs/useCookieValue/useCookieValue"
  2. use webpack-bundle-analyzer to view the bundle

What is the expected behavior?

It should include useCookieValue only rather than whole bundle

I believe the potential cause is because we import the other hooks in this syntax import { useFirstMountState, useMountEffect, useSafeState, useSyncedRef } from '..';

vip30 avatar Sep 19 '22 09:09 vip30