Add babel-plugin-polished to a create-react-app app via react-app-rewired.
yarn add --dev react-app-rewire-polished
or
npm install --save-dev react-app-rewire-polished
// config-overrides.js
const rewirePolished = require('react-app-rewire-polished');
module.exports = function override (config, env) {
config = rewirePolished(config, env);
// other rewires...
return config;
}
or
// config-overrides.js
const { compose } = require('react-app-required')
const rewirePolished = require('react-app-rewire-polished');
module.exports = compose(
rewirePolished,
// other rewires...
);