From 97216a6f260af4d4932ae8a9ab1bb923044dc0f0 Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Wed, 8 Jul 2020 18:39:45 +0300 Subject: [PATCH] Add styled-components babel configs --- .babelrc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.babelrc b/.babelrc index 70ee90d..a937b76 100644 --- a/.babelrc +++ b/.babelrc @@ -4,13 +4,29 @@ "react" ], "plugins": [ - "react-hot-loader/babel" + "react-hot-loader/babel", + [ + "babel-plugin-styled-components", + { "ssr": true, "displayName": true, "preprocess": false } + ] ], "env": { "production": { + "plugins": [ + [ + "babel-plugin-styled-components", + { "ssr": true, "displayName": true, "preprocess": false } + ] + ], "presets": ["minify"] }, "test": { + "plugins": [ + [ + "babel-plugin-styled-components", + { "ssr": true, "displayName": true, "preprocess": false } + ] + ], "presets": ["env", "react"] } }