You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package.json file specifies "type": "module", but entry point uses commonjs (require Syntax).
refer to: https://nodejs.org/api/packages.html#type
This causes errors when you try to test with vitest. You will get "require() of ES Module ... not supported."
Expected Behavior
The package.json should state "type": "commonjs" or change ./dist/tocbot.js file to ./dist/tocbot.cjs
Environment
Library version: v4.28.2
The text was updated successfully, but these errors were encountered:
Hey, sorry for the late reply, I was out of town last week.
Can you help me figure out how to reproduce this issue?
I've tried building a project with the lastest version of vite and adding tocbot to it but I do not see any build errors (yarn create vite my-app --template react). I also will note that I did change the project type from module to commonjs, but maybe I'm missing something else.
A reproduction of this issue would be very helpful.
Thanks!
Issue description
The package.json file specifies
"type": "module"
, but entry point uses commonjs (require Syntax).refer to: https://nodejs.org/api/packages.html#type
This causes errors when you try to test with vitest. You will get "require() of ES Module ... not supported."
Expected Behavior
The package.json should state
"type": "commonjs"
or change./dist/tocbot.js
file to./dist/tocbot.cjs
Environment
Library version: v4.28.2
The text was updated successfully, but these errors were encountered: