The library is working great! But, when running tests with vitest, the imports are breaking for two reasons.
vitest uses Node module resolution, which ignores module, so to tell an ESM based project to use esm/index.js during testing, you must include the exports property in package.json. An example of how that would look is below.
There is a require('quill') in esm/index.js, which still causes resolution to break in ESM environments. This would need to be changed to a dynamic import (import('quill')).
The library is working great! But, when running tests with vitest, the imports are breaking for two reasons.
module
, so to tell an ESM based project to useesm/index.js
during testing, you must include theexports
property in package.json. An example of how that would look is below.require('quill')
inesm/index.js
, which still causes resolution to break in ESM environments. This would need to be changed to a dynamic import (import('quill')
).