When upgrading to v11.0.0, imports in our project breaks.
That's because with the new build, the package is imported as CJS as default as opposed to es5 Module.
In the built package.json the following 'exports' option should be added. That way, the es5 module would be used for all import statements by default
{
"main": "dist/fsxa-proxy-api.cjs.js", // CJS version
"module": "dist/fsxa-proxy-api.es5.js", // ES5/ESM version
"exports": {
".": {
"import": "./dist/fsxa-proxy-api.es5.js",
"require": "./dist/fsxa-proxy-api.cjs.js"
}
}
}
When upgrading to v11.0.0, imports in our project breaks.
That's because with the new build, the package is imported as CJS as default as opposed to es5 Module.
In the built
package.jsonthe following 'exports' option should be added. That way, the es5 module would be used for all import statements by default