I am trying to use crypto-pouch (3.1.1) in a create-react-app (webpack based) application.
In development mode, everything works fine, but during a production build I get the following error:
Creating an optimized production build...
Failed to compile.
static/js/main.527d795f.js from UglifyJs
SyntaxError: Unexpected token: name (check) [./~/native-crypto/lib/decrypt.js:4,0]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The error only occurs when crypto-pouch is required/imported by the app.
To reproduce:
I am trying to use crypto-pouch (3.1.1) in a create-react-app (webpack based) application. In development mode, everything works fine, but during a production build I get the following error:
The error only occurs when crypto-pouch is required/imported by the app. To reproduce:
then add the following at the top of "my-app/src/index.js"
Start a production build
And now an error is reported.