Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Info: Fails to build a minified create-react-app with ipfs #1321

Closed
@fsdiogo

Description

@fsdiogo

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions