Closed EzraBrooks closed 4 months ago
Had to upgrade from eventemitter2 to eventemitter3 to get this PR to work at all because of broken TypeScript declarations in eventemitter2. Extracted that change to #668.
Sorry for the delay here, it's actually a good sign, because this branch has been working in such a bulletproof manner on my project that I've been forgetting to come back and finish this..
See #687 for why we're doing this! The existing library layout didn't work with Rollup and Vite, but after this PR it does!
Public API Changes
This is definitely a breaking change. Code requiring CommonJS modules may no longer work the same way or at all.
Description
This removes usage of the old CommonJS module
require
syntax in favor of ECMAScript Moduleimport
syntax, to ease the adoption of a newer bundler like Rollup. This code works in my Vite-based codebase, so it should work in Rollup.The bulk of this PR is a change to
package-lock.json
from shuffling dependencies around.Related to desire for a better/newer bundler in #647.