Is this package pure ESM? getting "require() of ES Module not supported." error #63
-
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Yes, this package is published as ESM-only.
Absolutely not. Since you are using a bundler, you don't have to set |
Beta Was this translation helpful? Give feedback.
Yes, this package is published as ESM-only.
Absolutely not. Since you are using a bundler, you don't have to set
"type": "module"
in your project'spackage.json
in order to use this library. All you need to do is toimport
this library instead of trying torequire
it. By the way, is there any particular reason you are usingrequire()
syntax in a Next.js project instead ofimport
?