I have the following error when running the application with the library.
ReferenceError: exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and 'C:\my-app\node_modules\react-ymd-date-select\package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
I'm using Next.JS 12 with TypeScript. Here's my tsconfig.json file content:
I have the following error when running the application with the library.
I'm using Next.JS 12 with TypeScript. Here's my
tsconfig.json
file content:If I remove
"type": "module",
from the library package.json it works.