Need help with babel-plugin-polished?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

styled-components
133 Stars 12 Forks MIT License 12 Commits 8 Opened issues

Description

Compile polished helper functions at build time

Services available

!
?

Need anything else?

Contributors list

babel-plugin-polished

Compile away polished helpers.

Example

In

import * as polished from 'polished';

let value = polished.clearFix();

Out

let value = {
  '&::after': {
    clear: 'both',
    content: '',
    display: 'table'
  }
};

Installation

$ npm install babel-plugin-polished

Usage

Via
.babelrc
(Recommended)

.babelrc

{
  "plugins": ["polished"]
}

Via CLI

$ babel --plugins polished script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["polished"]
});

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.