I am build my project using vite babel typescript and dynamic import
Dev build is working fine
But production build had some strange problem
I see that some function named _interopRequireWildcard calls the function _typeofB
_typeofB - not callable, but they have a default method
_typeofB = {
default: ƒ _typeofA(obj)
__esModule: true
}
What configuration property can affect this?
i.e. bundle code with error:
import {a7 as getAugmentedNamespace, a8 as _typeofA, ...} from './vendor.js';
var requireA = /*@__PURE__*/getAugmentedNamespace(_typeofA);
var _typeofB = requireA;
function _interopRequireWildcard(obj, nodeInterop) {
if (obj === null || _typeofB(obj) !== "object" && typeof obj !== "function") {
^^^^^^^^ - _typeofB is not a function
return {
"default": obj
};
}
...
}
That works if I manually add:
if (obj === null || _typeofB["default"](obj) !== "object" && typeof obj !== "function") {
^^^^^^^^^^^