I am currently trying to install ExtPay, a payment library for Chrome Extension, from the following link: https://github.com/Glench/ExtPay. I followed the instructions up until step 3 which involved adding ExtPay to background.js. However, I encountered an error which I suspect is due to using Typescript and Webpack in this manner:
background.ts
import "ExtPay"
const extpay = ExtPay("sample-extension")
Error TS2552: Cannot find name 'ExtPay'. Did you mean 'extpay'?
After trying suggestions from comments, I attempted:
const ExtPay = require("ExtPay")
const extpay = ExtPay("sample-extension")
This resulted in Error TypeError: ExtPay is not a function.
Any Ideas on how to resolve this issue?
Here is a snippet of my webpack configuration:
webpack.common.js
// Include necessary plugins and modules
...
Webpack.dev.js
// Include settings for development environment
...