Compatibility with commonjs
gabriel-logan opened this issue · 4 comments
gabriel-logan commented
gabriel-logan commented
If you are using typescript to produce, I would give you a tip, send it to npm using
"module": "CommonJS",
in tsconfig because this way it transpiles to CommonJS and whoever uses your code can use it either via import or via require
the way you did it, only import export works
SBoudrias commented
Please refer to the installation guide. Both version 9 (esm) and 8 (cjs) are in maintenance mode.
Recommendation is to migrate to the new API; see #1214
gabriel-logan commented
SBoudrias commented
The new API supports both (it's in typescript making it easy)