-
-
Notifications
You must be signed in to change notification settings - Fork 227
v0.10.1 - SSR breaks because of React-Popper + No /dist builds in 1.0beta5 #145
Comments
@virgofx for v0.10.1 see this issue I've raised with babel-plugin-transform-react-remove-prop-types. Basically the default mode that is supposed to entirely remove the propTypes from production builds is not working for React stateless functional components and therefore I can't fix issue #142. As you've found in this issue
|
I'm not sure about the stateless components; however, the issue with regards to process can be fixed quite easily. I'll submit a PR which fixes this. |
@virgofx Try following the replication steps I've posted on that ticket about stateless functional components and you'll understand. The point is that FYI: The The intended default behaviour of the plugin is to remove propType declarations entirely |
So seems to fix
Regardless, the Rollup replace plugin (equivalent of Webpack's define) should be used regardless so my thought is to just leave as mode:wrap which is intended for libraries that may be consumed externally. (Minus any areas with SFC that don't work) ... Regardless, server rendering should be fixed after that, correct? I added the rollup replace and got the process.env.NODE_ENV all removed and it works fine in my local environment. |
Fixed in 0.10.2 |
The UMD build is broken in v0.10.1 because of:
Manager.propTypes = process.env.NODE_ENV !== "production" ? {
The production build should use plugin that optimizes and removes this code ahead of time. In Webpack it was the Define plugin. Then the remove prop-types plugin will correctly wrap it and leave it as
{}
.What's the best way to resolve this?
0.10.1
1.x.x
Ref: #142
The text was updated successfully, but these errors were encountered: