30 lines
584 B
Markdown
30 lines
584 B
Markdown
|
# postcss-remove-bem-blocks
|
||
|
|
||
|
[PostCSS](https://github.com/postcss/postcss)-плагин для удаления БЭМ-блоков (включая их модификаторы и элементы) из конечного CSS.
|
||
|
|
||
|
## Установка
|
||
|
|
||
|
```bash
|
||
|
yarn add -D @advdominion/postcss-remove-bem-blocks
|
||
|
```
|
||
|
|
||
|
## Использование
|
||
|
|
||
|
`postcss.config.js`
|
||
|
|
||
|
```js
|
||
|
const plugins = [];
|
||
|
|
||
|
if (process.env.NODE_ENV === 'production') {
|
||
|
plugins.push(
|
||
|
require('@advdominion/postcss-remove-bem-blocks')({
|
||
|
blocks: ['.stylepage'],
|
||
|
})
|
||
|
);
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
plugins,
|
||
|
};
|
||
|
```
|