PptxGenJS works seamlessly in modern web and Node environments, thanks to dual ESM and CJS builds and zero runtime dependencies. Whether you’re building a CLI tool, an Electron app, or a web-based presentation builder, the library adapts automatically to your stack.
Vite, Webpack, and modern bundlers automatically select the right build via the
exports
field inpackage.json
. Tip: if you’re unsure, start with the ES module build (pptxgen.es.js
). All modern bundlers and runtimes understand it, and it tree-shakes out the Node-only code paths automatically.
dist/pptxgen.cjs.js
dist/pptxgen.es.js