【发布时间】:2025-12-06 12:10:01
【问题描述】:
使用方法:https://github.com/w3c/IntersectionObserver/tree/master/polyfill
我应该将它加载到 webpack 配置 - vue.config.js 中还是应该使用导入将它加载到 .vue 模板中?
【问题讨论】:
-
你发现了吗?我认为 vue-cli 内置的 babel/core-js 应该可以处理这个问题。
-
Intersection Observer 是浏览器独有的功能,core-js 中没有提供。 github.com/zloirock/core-js/issues/386
标签: vue.js intersection-observer