-
-
Notifications
You must be signed in to change notification settings - Fork 227
v0.10.1: Consider removing transform-react-remove-prop-types mode of 'wrap' #142
Comments
0.10.1 is mostly maintenance only at this point. Most of the consumers prefer to have a good DX rather than the ability to run the unminified package in the browser. I'd rather keep the things as they are, feel free to switch to the 1.x branch, it's stable at this point. |
Only problem, is that
|
Thanks for pointing it out, please feel free to send a PR to strip it out from the minified build if you have some time to allocate to it. Thanks! 🤩 |
Will do, thanks 👍 |
Ok, there's a bit of Yak shaving going on now. I've made the change but the babel plugin is not removing |
@nijk The process.env part should get removed completely. That's definitely a bug. Webpack has the DefinePlugin which handles that. Not sure how it's being built here but those comparisons should be removed from all production builds 100%. The original intent for getting babel Keep us posted what you find and thanks for helping get the builds sorted out. |
Thanks @virgofx, it's a pleasure :) This library uses rollup rather than webpack. My understanding is that the Webpack DefinePlugin allows the inclusion of global vars at compile time as opposed to the removal of references in the compiled code, as such The issue at play here should be solved if the maintainers at |
Server side rendering is broken actually with the new UMD build
Need to fix this. |
Reproduction demo
Firstly I'd like to thank you for this library and Popper.js.
I'm currently trying to get this working in a ClojureScript app and I'm having some real difficulties getting Closure Compiler not to strip the
process.env
variable in it's advanced optimization mode. It's a bit of a pain but I've managed to isolate the need for theprocess
var down to this dependency. As far as I can tell thewrap
mode is not the default configuration for this reason:Steps to reproduce the problem
process not defined
unless process is explicitly provided (as is done in the v0.x CodePen template)What is the expected behavior?
Ideally not to have a dependency on
window.process.env
in either development or production buildsWhat went wrong?
I think this could easily be solved by removing
, { mode: 'wrap' }
fromrollup.config.js
.Any other comments?
I'm happy to raise a PR for this if you would be happy to consider it.
Packages versions
The text was updated successfully, but these errors were encountered: