Skip to main content

Create React App (CRACO)

tip

Many applications do not require this plugin. Unless you have been directed here by other documentation, you can probably skip these instructions. See “Should I install the plugin?” for more information.

info

These instructions are for apps created with Create React App where CRACO is already being used. If you have not yet set up CRACO, we recommend using customize-cra to set up your app.

  1. Install the mightymeld package in your project:

    npm install --save-dev mightymeld
  2. Edit your CRACO config file to include the following:

    craco.config.js
    // Example CRACO config file
    module.exports = {
    webpack: {
    ...
    }
    };

    // Use MightyMeld plugin when run by MightyMeld.
    if (process.env.MIGHTYMELD) {
    module.exports.babel = {
    plugins: ["mightymeld/babel-plugin-mightymeld"]
    };
    }