yeojz / otplib

:key: One Time Password (OTP) / 2FA for Node.js and Browser - Supports HOTP, TOTP and Google Authenticator

Home Page:https://otplib.yeojz.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TSC compiles with "target": "es2017", could this be changed to es6 ?

capaj opened this issue · comments

Is your feature request related to a problem? Please describe.
yes. When this is used in webpack without tranpilation it breaks.

Describe the solution you'd like
entry point should be es6 at most

Describe alternatives you've considered
transpiling in my own build pipeline

Additional context
best practice is to have two bundles-
main: CJS es5
module: ESM es6

By having the main as ESM es2017 it forces any user of this package to enable tranpiling of this module in their webpack config