Skip to content

Commit 816941e

Browse files
committed
add commonjs plugin factory function
1 parent b21631b commit 816941e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

rollup/plugins/bundlePlugins.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* CommonJS plugin docs: https://github.com/rollup/plugins/tree/master/packages/commonjs
23
* License plugin docs: https://github.com/mjeanroy/rollup-plugin-license
34
* Replace plugin docs: https://github.com/rollup/plugins/tree/master/packages/replace
45
* Resolve plugin docs: https://github.com/rollup/plugins/tree/master/packages/node-resolve
@@ -7,6 +8,7 @@
78
* Typescript plugin docs: https://github.com/ezolenko/rollup-plugin-typescript2
89
*/
910

11+
import commonjs from '@rollup/plugin-commonjs';
1012
import deepMerge from 'deepmerge';
1113
import license from 'rollup-plugin-license';
1214
import resolve from '@rollup/plugin-node-resolve';
@@ -146,6 +148,7 @@ export function makeTSPlugin(jsVersion) {
146148
return plugin;
147149
}
148150

149-
// We don't pass this plugin any options, so no need to wrap it in another factory function, as `resolve` is itself
150-
// already a factory function.
151+
// We don't pass these plugins any options which need to be calculated or changed by us, so no need to wrap them in
152+
// another factory function, as they are themselves already factory functions.
151153
export { resolve as makeNodeResolvePlugin };
154+
export { commonjs as makeCommonJSPlugin };

0 commit comments

Comments
 (0)