Commit 57dac24
Allow boolean plugins support (#142)
Allow boolean plugins similar to how Rollup plugins work. In the Rollup plugins array you may write the following to only run a plugin for production usage:
```js
plugins: [
(process.env.NODE_ENV === 'production' && terser())
]
```
This pull request allow the same approach for PostCSS plugins:
```js
plugins: [
(process.env.NODE_ENV === 'production' && cssnano())
]
```
[Example of how Rollup has implemented this feature.](https://github.com/rollup/rollup/blob/f58d1e60a3da4b8470e5d56aa0caef2ecadec2b8/src/rollup/index.ts#L107)1 parent b201582 commit 57dac24
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
0 commit comments