diff --git a/scm-ui/babel-preset/index.js b/scm-ui/babel-preset/index.js index 14d3d23731..ddba529dd2 100644 --- a/scm-ui/babel-preset/index.js +++ b/scm-ui/babel-preset/index.js @@ -7,6 +7,10 @@ module.exports = api => { require("@babel/preset-react"), require("@babel/preset-typescript") ], - plugins: [require("@babel/plugin-proposal-class-properties"), require("@babel/plugin-proposal-optional-chaining")] + plugins: [ + require("babel-plugin-styled-components"), + require("@babel/plugin-proposal-class-properties"), + require("@babel/plugin-proposal-optional-chaining") + ] }; }; diff --git a/scm-ui/babel-preset/package.json b/scm-ui/babel-preset/package.json index 4751670f65..85eb6bf8f9 100644 --- a/scm-ui/babel-preset/package.json +++ b/scm-ui/babel-preset/package.json @@ -14,7 +14,8 @@ "@babel/preset-env": "^7.6.3", "@babel/preset-flow": "^7.0.0", "@babel/preset-react": "^7.6.3", - "@babel/preset-typescript": "^7.6.0" + "@babel/preset-typescript": "^7.6.0", + "babel-plugin-styled-components": "^1.10.7" }, "publishConfig": { "access": "public" diff --git a/yarn.lock b/yarn.lock index 93fa8adc3b..7af10ca445 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3934,6 +3934,16 @@ babel-plugin-require-context-hook@^1.0.0: babel-plugin-syntax-jsx "^6.18.0" lodash "^4.17.11" +babel-plugin-styled-components@^1.10.7: + version "1.10.7" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.7.tgz#3494e77914e9989b33cc2d7b3b29527a949d635c" + integrity sha512-MBMHGcIA22996n9hZRf/UJLVVgkEOITuR2SvjHLb5dSTUyR4ZRGn+ngITapes36FI3WLxZHfRhkA1ffHxihOrg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-module-imports" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" + lodash "^4.17.11" + babel-plugin-syntax-jsx@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"