Stripes webpack broken on folio-release-core and folio-release builds
Description
CSP Request Details
CSP Rejection Details
Potential Workaround
Attachments
is duplicated by
relates to
Checklist
hideTestRail: Results
Activity
Zak Burke July 1, 2019 at 7:27 PMEdited
Most of the troubleshooting around this focused on platform-complete, rather than platform-core, and that's where we discovered the bad interaction between withRoot()
and hot()
in ui-eholdings with react-hot-loader > 4.8.8. IIRC, we only observed this issue in platform-core with NODE_ENV=""
which is really a valid value an invalid value; it should be either production
or development
.
My take-away is that this behavior is caused by two or more independent things with react-hot-loader > 4.8.8:
setting
NODE_ENV=""
calling
export default hot(module)(withRoot($MODULE))
in react-hot-loader > 4.8.8, which we only happen to do in ui-eholdings
It is unclear to me whether eHoldings or withRoot
is the actual source; we have not started that investigation.

Matt Jones July 1, 2019 at 4:09 PM
It could. I don't know what the root cause is. It may have been a regression in react-hot-loader, or some existing misconfiguration on our part that wasn't surfaced until a newer version of react-hot-loader was released.
If it's the latter, then eHoldings seems suspect given and found that removing eHoldings from platform-complete also solved the problem. Further, from a cursory glance, eHolding's export differs slightly from other apps. As notes, changing the eHoldings export appears to resolve it.
Then again, as points out, this issue was observed on platform-core which doesn't contain eHoldings. Seems like this issue could use some further analysis.

Sobha Duvvuri July 1, 2019 at 3:22 PM
Ah, got it. Thanks . So, does this issue have anything to do specifically with eHoldings?

Matt Jones July 1, 2019 at 2:45 PM
NODE_ENV=production is a precondition to observing this issue. Based on 's comments, snapshot is using NODE_ENV=development and therefore the issue is not present.

Sobha Duvvuri July 1, 2019 at 2:32 PMEdited
Hey , , and : We recently got bit by this issue while building similar versions of modules as folio-snapshot and pinning the specific version of react-hot-loader helped us get around this, but since eHoldings was mentioned above, is it really true that eHoldings is the problem-creator? Because, if yes, I can ask our team to look at this issue. Please let us know. Thanks!
Also curious, how did this fix make it into master branch of platform-complete but not snapshot and it still builds fine? Thanks!
The UI is broken in the latest iteration of the Q2 release of the core modules and complete set of FOLIO modules with some sort of low-level react or webpack error.
https://github.com/folio-org/platform-core . (master) --> https://folio-release-core.aws.indexdata.com
https://github.com/folio-org/platform-complete (master) --> https://folio-release.aws.indexdata.com