@pi-r/rollup 0.10.4 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -14,7 +14,10 @@ const PLUGIN_MAP = Object.freeze({
|
|
|
14
14
|
'@rollup/plugin-node-resolve': nodeResolve
|
|
15
15
|
});
|
|
16
16
|
function getPlugins(plugin) {
|
|
17
|
-
|
|
17
|
+
if (plugin) {
|
|
18
|
+
return !Array.isArray(plugin) ? [plugin] : plugin;
|
|
19
|
+
}
|
|
20
|
+
return [];
|
|
18
21
|
}
|
|
19
22
|
async function transform(context, value, options) {
|
|
20
23
|
context = options.upgrade(context, __dirname);
|
|
@@ -187,9 +190,6 @@ async function transform(context, value, options) {
|
|
|
187
190
|
for (const file of tmp) {
|
|
188
191
|
fs.unlink(file, () => { });
|
|
189
192
|
}
|
|
190
|
-
if (tempDir) {
|
|
191
|
-
fs.rm(tempDir, { recursive: true, force: true }, () => { });
|
|
192
|
-
}
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
195
|
if (result) {
|