Closed oliviertassinari closed 7 years ago
👍 thanks, is this released on npm already?
It's on npm now.
@oliviertassinari I've just installed and retried the use cases listed on #106 and nothing changed from my perspective. The propTypes mentioned in the issue keeps on living in the compiled code, they are never removed, also the import is never removed as well
Also adding the special comments for helping the plugin has no effect at all:
BaseLink.propTypes[storeName] /* remove-proptypes */ = PropTypes.object;
I'm not supporting that pattern, have a look at the test case.
also the import is never removed as well
From my understanding of the situation, you are shipping a library, you need to keep them so users get warnings in dev mode. Have a look at the test case, I think that it's what you need, but not what you want (guess).
👍 thanks for the suggestion, I wasn't aware of es6 object dynamic keys, that solve the problem I was trying to fix.
I will ship the PropTypes then as you suggested.
I've made a local test with your suggestion and I can confirm that it fixes the problem, all the proptypes are removed as well as the import.
Thanks 👍
Awesome 😄 , unless you noticed it, the test case is using the wrap
mode. I would encourage you doing the same. Here the docs.
Closes #106.