Skip to content
This repository was archived by the owner on Jan 4, 2022. It is now read-only.

osdevisnot/react-app-rewire-contrib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-app-rewire-emotion

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

Installation

yarn add --dev react-app-rewire-emotion 

Usage

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 }); } 

Usage with Storybook

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 }); }; 

Inspirations

react-app-rewire-styled-components by @mxstbr

License

Licensed under MIT License, Copyright @ 2017 osdevisnot. See LICENSE.md for more details.

About

A collection of rewires for react-app-rewired

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 7