circomlibjs/rollup.cjs.config.js
tornadocontrib 2aef7aade8
Support commonjs as well
Full compare: bfa4ce1366...tornadocontrib:circomlibjs:main
2024-12-18 17:32:18 +00:00

16 lines
337 B
JavaScript

import fs from "fs";
import { builtinModules as builtin } from "module";
const pkg = JSON.parse(fs.readFileSync("./package.json"));
export default {
input: "./main.js",
output: {
file: "build/main.cjs",
format: "cjs",
},
external: [
...Object.keys(pkg.dependencies),
...builtin,
]
};