Created
July 24, 2018 02:01
-
-
Save varHarrie/95bfc10c56953ac322e7f84a8663f306 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rewire = require('react-app-rewired') | |
module.exports = function rewireEmotion (config, env) { | |
if (env === 'development') { | |
config = rewire.injectBabelPlugin(['emotion', { sourceMap: true, autoLabel: true, "labelFormat": "📦[filename]--[local]" }], config) | |
} else { | |
config = rewire.injectBabelPlugin(['emotion', { hoist: true }], config) | |
} | |
return config | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment