Skip to content

Instantly share code, notes, and snippets.

@artalar
Created November 1, 2017 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artalar/7278ac8021ca3d7d811361280b93e028 to your computer and use it in GitHub Desktop.
Save artalar/7278ac8021ca3d7d811361280b93e028 to your computer and use it in GitHub Desktop.
Add styled-components class naming with CRA
const { injectBabelPlugin } = require('react-app-rewired');
module.exports = (config, env) => {
config = injectBabelPlugin(
[
'babel-plugin-styled-components',
{
displayName: true,
},
],
config
);
return config;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment