`(0, _index.function)()` 相当于: const func = _index.function func() 直接 `_index.function()` 调用时,`function` 中的 `this` 为 `_index`。而通过 `(0, _index.function)()` 间接调用,相当于在全局作用域调用函数。在严格模式中,此时函数 `function` 的 `this` 为 `undefined`。 const obj = { a: 2, func() { console.log(this, this?.a) } } obj.func(); // { a: 2 } 2 (0, obj.func)() // undefined undefined