You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
There are a lot of issues regarding create-react-app and js-ipfs, let's keep that discussion in this one, as well as options to make them play well together.
✅ js-ipfs minified version
The minified version of IPFS (when you run npm run build and outputs to dist/index.min.js) wasn't being uglified (compressed and mangled) due to the way we were doing some type checks. This has been solved and will be available in the 0.29.0 release.
ℹ️ create-react-app
For those who are using create-react-app with IPFS, you'll still encounter some issues when trying to build a production version. The problem comes from create-react-app itself and not IPFS, because it uses UglifyJS that still doesn't support ES6. As IPFS doesn't offer a transpiled version, trying to build a production version of a CRA with IPFS will fail to minify. A new version of CRA is being worked on, using uglify-es that supports ES6. Until then, developers have a few options:
Eject and change the webpack configs to use uglify-es intead of uglify-js