Closed epascal closed 1 year ago
PS: really great component, thank you for the work
@epascal Why I have to exclude prop-types from test environment ? what problem do you have with require('prop-types')
I ran into this as well, the problem is that prop-types
is not declared as a dependency of the package!
To fix it just install as dev deps. :
yarn add -D prop-types
In line 1058 of component.tsx the test for production should be either test against production and test or for development
if (process.env.NODE_ENV !== 'production') { <-------------------------------- should be === 'development' or !== 'test! || !== 'production' const { any, element, object, number, func, bool } = require('prop-types');
// @ts-ignore PinchZoom.propTypes = { children: element, containerProps: object,
if (process.env.NODE_ENV !== 'production') {