If I'm trying to use puppeteer with TypeScript and esModuleInterop=true set in tsconfig.json I get an error saying
puppeteer.launch is not a function
if I try to import puppeteer with
import * as puppeteer from "puppeteer";
Now to my question: Is this intended behavior or a bug?
For me, it's not a big deal to just set esModuleInterop to false, but it seems odd
Small add-on:
if I manually change puppeteer.launch() to puppeteer.default.launch() in index.js it works
Links:
tsconfig.json: https://pastebin.com/6xvkfJg2
package.json: https://pastebin.com/ViwfMwyQ
index.ts: https://pastebin.com/GtHuiHSJ
index.js: https://pastebin.com/TzeCDiGn