Skip to content

Commit

Permalink
Append named exports to the generated esm bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguttandin committed Jun 9, 2018
1 parent 78f7549 commit f70ff62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rollup.config.js
Expand Up @@ -3,11 +3,14 @@ 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"
format: "es",
outro: Object.keys(sinon).map((key) => `const _${key} = sinon.${key};\nexport { _${key} as ${key} };`).join('\n')
},
plugins: [
nodeResolve({
Expand Down

0 comments on commit f70ff62

Please sign in to comment.