Closed
Description
Post 3.4.1, the top-level package.json
has been changed to have type: module
.
Our host environment is ESM as well, and as such we import jquery-migrate. Unfortunately, with the type defined as module, the CommonJS/AMD wrapper is falling through to browser globals when compiled, and we don't have browser globals for anything, jquery included, and thus we're failing at runtime.
Removing type: module
from the 3.5.0 package.json
does resolve the issue.
Using webpack 5.93.0, jquery 3.7.1, jquery-migrate 3.5.0. Backing off to 3.4.1 resolves the issue, as that release did not have type:module
present.