Add emotion/babel babel plugin to create-react-app using react-app-rewired
Add the emotion/babel
to create-react-app
app via react-app-rewired
yarn add --dev react-app-rewire-emotion
In the config-overrides.js
you created for react-app-rewired
add this code:
const rewireEmotion = require('react-app-rewire-emotion'); /* config-overrides.js */ module.exports = function override(config, env) { return rewireEmotion(config, env, { inline: true }); }
When using @storybooks/storybook
with CRA via getstorybook
, create a webpack.config.js
file in .storybook
folder and add this code:
const rewireEmotion = require('react-app-rewire-emotion'); module.exports = function override(config, env) { return rewireEmotion(config, env, { inline: true }); };
react-app-rewire-styled-components by @mxstbr
Licensed under MIT License, Copyright @ 2017 osdevisnot. See LICENSE.md for more details.