Created
January 17, 2020 11:20
-
-
Save mornir/b62ed60f806c5d6dbc76f4501d804e24 to your computer and use it in GitHub Desktop.
Example of config for nuxt-polyfill module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
polyfill: { | |
features: [ | |
{ | |
require: 'object.entries', | |
detect: () => 'entries' in window.Object, | |
install: entries => entries.shim(), | |
}, | |
{ | |
require: 'url-search-params-polyfill', | |
detect: () => 'URLSearchParams ' in window, | |
}, | |
{ | |
require: 'focus-visible', | |
}, | |
{ | |
require: 'intersection-observer', | |
detect: () => 'IntersectionObserver' in window, | |
}, | |
{ | |
require: 'smoothscroll-polyfill', | |
detect: () => | |
'scrollBehavior' in document.documentElement.style && | |
window.__forceSmoothScrollPolyfill__ !== true, | |
install: smoothscroll => smoothscroll.polyfill(), | |
}, | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment