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.
Install the
mightymeld
package in your project:- npm
- Yarn
- pnpm
npm install --save-dev mightymeld
yarn add --dev mightymeld
pnpm add --save-dev mightymeld
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"]
};
}