Rollup plugin to check if objects exist in your bundle with a specified name.
yarn add rollup-plugin-object-exists --dev
(p)npm i rollup-plugin-object-exists --save-dev
import { rollup } from "rollup";
import objectExists from "rollup-plugin-object-exists";
rollup({
input: "file.js",
plugins: [
objectExists(["objectName", "otherObjectName"], (found) => {
for (let obj of found) {
console.log(obj)
}
}),
]
})