babel-plugin-react-semcore
v4.1.0
Published
Utility for `@semcore` component's styles manipulations.
Downloads
4
Readme
babel-plugin-react-semcore
Utility for @semcore
component's styles manipulations.
Install
yarn:
$ yarn add babel-plugin-react-semcore -D
Usage
Webpack:
{
test: /\.js$/,
include: /\/node_modules\/semcore\//,
enforce: 'pre',
use: {
loader: require.resolve('babel-loader'),
options: {
babelrc: false, // optional, include if u use .babelrc
configFile: false, // optional, include if u use babel.config.js, doesnt affect babelrc option https://babeljs.io/docs/en/options#configfile
plugins: [['babel-plugin-react-semcore', {
...pluginOptions
}]]
},
},
}
Options
| Option | Type | Description |
| -------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| media | boolean
| This option enables adaptive styles in @semcore
components |
| theme | string
or string[]
| This option applies theme to @semcore
components. |
| purgeCSS | Object
= { shorten: false }
| This option forwards options to css-purge tool, which removes duplicates from built styles |