Closed codepunkt closed 5 years ago
Hi @codepunkt!
I never liked that feature in babel's config because I always found it confusing. Instead, I recommend folks use the js variant.
// babel-plugin-macros.config.js
module.exports = {
styledComponents: {
displayName: process.env.NODE_ENV !== 'production'
}
}
I much prefer this in my own babel config and I don't want to create a DSL for something so simple. Thanks anyway!
@kentcdodds thanks! 👍
It would be great if babel-plugin-macros could read environment specific configuration the way babel does, e.g. using
styled-components
macro with this configuration inpackage.json
would then use{ displayName: true}
unless in production, where it would use{ displayName: true }
What do you think?