forked from sinonjs/sinon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
29 lines (25 loc) · 790 Bytes
/
rollup.config.js
File metadata and controls
29 lines (25 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import commonjs from "rollup-plugin-commonjs";
import nodeResolve from "rollup-plugin-node-resolve";
import builtins from "rollup-plugin-node-builtins";
import globals from "rollup-plugin-node-globals";
const sinon = require("./lib/sinon.js");
export default {
input: "./lib/sinon.js",
output: {
file: "pkg/sinon-esm.js",
format: "es",
outro: Object.keys(sinon).map((key) => `const _${key} = sinon.${key};\nexport { _${key} as ${key} };`).join('\n')
},
plugins: [
nodeResolve({
jsnext: true,
main: true
}),
commonjs({
// if false then skip sourceMap generation for CommonJS modules
sourceMap: true // Default: true
}),
builtins(),
globals()
]
};