Compile away polished helpers. This is a fork from the original package to overcome dependency stuck at v.1.0.0 of polished package.
$ npm install babel-plugin-polished-fork
or
$ yarn add babel-plugin-polished-fork
.babelrc
{
"plugins": [
[
"babel-plugin-polished-fork",
{
"module": "polished"
}
]
]
}
$ babel --plugins polished script.js
In
import * as polished from 'polished';
let value = polished.clearFix();
or
import { clearFix } from 'polished';
let value = polished.clearFix();
Out
let value = {
'&::after': {
clear: 'both',
content: '',
display: 'table'
}
};