Skip to content

Commit

Permalink
shell-ui: Add styled-component namespacing
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWatenbergScality committed Apr 2, 2021
1 parent 9d6d583 commit a36d3af
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
44 changes: 32 additions & 12 deletions shell-ui/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
if (process.env.NODE_ENV === "test") {
if (process.env.NODE_ENV === 'test') {
module.exports = {
"presets": ["@babel/preset-env", "@babel/preset-flow", ["@babel/preset-react", {
"runtime": "automatic"
}]],
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
presets: [
'@babel/preset-env',
'@babel/preset-flow',
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
],
plugins: ['@babel/plugin-transform-modules-commonjs'],
};
} else {
module.exports = {
"presets": ["@babel/preset-env", "@babel/preset-flow", ["@babel/preset-react", {
"runtime": "automatic"
}]]
}

plugins: [
[
'babel-plugin-styled-components',
{
namespace: 'shell-ui',
},
]
]
presets: [
'@babel/preset-env',
'@babel/preset-flow',
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
],
};
}

1 change: 1 addition & 0 deletions shell-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@testing-library/user-event": "^13.0.10",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"babel-plugin-styled-components": "^1.12.0",
"css-loader": "^5.0.1",
"flow-bin": "^0.143.1",
"html-webpack-plugin": "^4.5.1",
Expand Down

0 comments on commit a36d3af

Please sign in to comment.