Copy the stock webpack.config.js from node_modules/@ionic/app-scripts/config/ somewhere and make it active using the steps described in “overriding config scripts” here. Add the following stanza to the module.exports:
externals: {
"crypto": "crypto"
},
That should be sufficient.
I like Square’s library, but I’m biased because I’m a contributor to the project.
I’m not work with ionic 3 and don’t know why they remove declarations.d.ts and how to work with third party libraries now. But you can create it manually. For example: