Closed
Description
The problem is two-fold. First, esbuild doesn’t allow importing CommonJS in our current configuration:
[plugin esbuild] node_modules/react/index.js: ▲ [WARNING] Converting "require" to "esm" is currently not supported [unsupported-require-call]
Second, if you use the commonjs rollup plugin, the module.exports
gets erroneously turned into the default export instead of using named exports.
I have to admit I’ve forgotten why we’re using both esbuild as a rollup plugin, instead of either using rollup by itself, or using esbuild by itself. 😕