react-checkbox-tree icon indicating copy to clipboard operation
react-checkbox-tree copied to clipboard

Checkbox tree does not work after minification

Open euticus opened this issue 3 years ago • 1 comments

Describe the bug The component works fine when I run it alone, but when I run it in a production environment it does not execute the onCheck function.

Reproduction steps node v16.14.2 react: "^17.0.2", react-dom: "^17.0.2", react-checkbox-tree: "^1.7.2"

  1. The checkbox is part of a component with a form that is utilizing the useForm() hook
  2. checked and expanded set via useState()
  3. When using yarn start the component loads the correctly in a dev environment
  4. run yarn run build and using the minified version in a production environment, the checkbox tree does not execute any logic within onCheck or onExpand (I tried a console.log here and it did not log anything)

Expected behavior The component should perform identical between dev and production environments.

euticus avatar Apr 12 '22 00:04 euticus

seeing the same issue unable to see checkbox tree in production in our project. we are seeing the blank page in prod, while in local we are able to see the checkbox tree.

ghost avatar May 10 '22 10:05 ghost

Can you provide a little more context on your build tools, or can you provide repo that showcases this issue?

For example, I know there were some issues with Create React App a while back, but that does not appear to be the case with the latest version of CRA and this library.

The Webpack config for this project minifies prior to pushing it to npm due to the mode being set to 'production'. I suspect that setting it to 'none' may help resolve any issue you are facing, but without being able to recreate that environment, it's just a guess.

jakezatecky avatar Nov 19 '22 00:11 jakezatecky

Closing due to lack of activity.

jakezatecky avatar Jan 17 '23 19:01 jakezatecky