I am trying to use PptxGenJS.
I installed it by npm install pptxgenjs --save
I created very simple function, according to the examples.
When I am doing: import * as PptxGenJS from 'pptxgenjs';
const pptx = new PptxGenJS();
I am getting error "pptxgenjs__WEBPACK_IMPORTED_MODULE_2__ is not a constructor"
When I am doing:
let PptxGenJS = require("pptxgenjs");
let pptx = new PptxGenJS();
I am getting the error: "TypeError: PptxGenJS is not a constructor"
I am using 3.0.1 with Angular8 on Ubuntu
make sure to allow synthetic default imports and esModule interoperability in your tsconfig file:
then import in into your component like this:
use like this: