Closed marlowl closed 2 years ago
thanks for opening this issue. Yea, due to breaking changes by webpack, they expect the developer to polyfill the node modules required instead of providing them out of the box.
theres a similar PR done by @simboonlong on upgrading to react-scripts v5 here: https://github.com/TradeTrust/document-creator-website/pull/244/
you could take a look and reference it, but essentially we are depending on react-app-rewired to make some extensions to the underlying webpack config, in particular this is the file with the polyfills required.
@cavacado @simboonlong Since this error is coming out of the @govtechsg/open-attesation
package itself, are there plans to update this package to support react-scripts 5 as well? Could imagine the same issue can pop-up for other @govtechsg/open-attesation
implementers.
we could look into supporting react-scripts 5 in the future but for now, I dont think we have such plans. Feel free to open an issue about it and reference this issue.
Thanks once again for the heads up.
Problem Using react-scripts v5 in combination with the latest package version of
@govtechsg/open-attestation
results in the following error:Reproduction steps
npx create-react-app my-app
cd my-app
npm i @govtechsg/open-attestation
App.js
to the following:Temporary solution Downgrading to react-scripts v4 fixes the issue (although this is not ideal)
Possible solution Follow the given steps provided by react-scripts v5