You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,32 @@
1
1
# rollup-plugin-conditional
2
2
A proxy plugin for conditionally executing rollup plugins.
3
+
<br>
4
+
<strong>NOTE:</strong> This plugin has entered maintenance only mode, meaning that only bugs will be fixed. See **`But do I really need it`** section to accomplish the same thing without a plugin.
3
5
4
6
## Why
5
7
There are times when you only want to run a plugin if certain conditions are met. This plugin aims to simplify that setup.
6
8
9
+
## But do I really need it?
10
+
Not really, in relatively newer versions on rollup you can accomplish the same thing using a simple spread mechanic:
11
+
12
+
```js
13
+
exportdefault {
14
+
...
15
+
plugins: [
16
+
...isProduction ? [
17
+
licence(),
18
+
strip(),
19
+
uglify(),
20
+
gzip()
21
+
] : []
22
+
]
23
+
};
24
+
```
25
+
26
+
In the end, this syntax is better because:
27
+
* It reduces the cost of overhead and increases performance slightly
0 commit comments