Closed saulhardman closed 3 years ago
I might consider removing Map. But not a big priority. In Nuxt.js you can add this package to the list of transpiled dependencies.
// nuxt.config.js
export default {
build: {
transpile: [
({ isLegacy }) => isLegacy && 'vue-lazy-hydration',
],
}
}
Hey Markus,
Thanks for the hard work on this project – it's very much appreciated 👍
I've just received an event in Sentry alerting me to the fact that someone using Chrome ~v60 tripped over this package's usage of
Map
. This led me to wonder what your recommended usage of this component is regarding feature polyfills? I can see that things degrade gracefully ifIntersectionObserver
is unsupported, but there's no conditional logic around support forMap
.These are the 3 options I've come up with so far:-
1) always
import
theMap
polyfill from core-js 2)include
theLazyHydrate
component inbabel-loader
rule (in which case Nuxt's config would handle polyfilling [unsure if double-transforming would cause any issues here]) 3) work out a way toimport()
the core-js polyfill, if support is missing, prior to the rest of the app running (probably via a Nuxt plugin in my case)I look forward to hearing your thoughts and am happy to help with adding to the docs if it proves necessary.