Remove object-fit-images

This commit is contained in:
Alex Gleason 2022-12-30 12:27:13 -06:00
parent 3dee22a3ff
commit 2737d41019
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
4 changed files with 2 additions and 19 deletions

View file

@ -2,6 +2,3 @@
import 'intersection-observer'; import 'intersection-observer';
import 'requestidlecallback'; import 'requestidlecallback';
import objectFitImages from 'object-fit-images';
objectFitImages();

View file

@ -28,15 +28,13 @@ function loadPolyfills() {
window.Symbol window.Symbol
); );
// Latest version of Firefox and Safari do not have IntersectionObserver. // Older versions of Firefox and Safari do not have IntersectionObserver.
// Edge does not have requestIdleCallback and object-fit CSS property.
// This avoids shipping them all the polyfills. // This avoids shipping them all the polyfills.
const needsExtraPolyfills = !( const needsExtraPolyfills = !(
window.IntersectionObserver && window.IntersectionObserver &&
window.IntersectionObserverEntry && window.IntersectionObserverEntry &&
'isIntersecting' in IntersectionObserverEntry.prototype && 'isIntersecting' in IntersectionObserverEntry.prototype &&
window.requestIdleCallback && window.requestIdleCallback
'object-fit' in (new Image()).style
); );
return Promise.all([ return Promise.all([

View file

@ -80,7 +80,6 @@
"@types/leaflet": "^1.8.0", "@types/leaflet": "^1.8.0",
"@types/lodash": "^4.14.180", "@types/lodash": "^4.14.180",
"@types/object-assign": "^4.0.30", "@types/object-assign": "^4.0.30",
"@types/object-fit-images": "^3.2.3",
"@types/qrcode.react": "^1.0.2", "@types/qrcode.react": "^1.0.2",
"@types/react-color": "^3.0.6", "@types/react-color": "^3.0.6",
"@types/react-datepicker": "^4.4.2", "@types/react-datepicker": "^4.4.2",
@ -150,7 +149,6 @@
"marky": "^1.2.4", "marky": "^1.2.4",
"mini-css-extract-plugin": "^2.6.0", "mini-css-extract-plugin": "^2.6.0",
"object-assign": "^4.1.1", "object-assign": "^4.1.1",
"object-fit-images": "^3.2.3",
"object.values": "^1.1.0", "object.values": "^1.1.0",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"postcss": "^8.4.14", "postcss": "^8.4.14",

View file

@ -2732,11 +2732,6 @@
resolved "https://registry.yarnpkg.com/@types/object-assign/-/object-assign-4.0.30.tgz#8949371d5a99f4381ee0f1df0a9b7a187e07e652" resolved "https://registry.yarnpkg.com/@types/object-assign/-/object-assign-4.0.30.tgz#8949371d5a99f4381ee0f1df0a9b7a187e07e652"
integrity sha1-iUk3HVqZ9Dge4PHfCpt6GH4H5lI= integrity sha1-iUk3HVqZ9Dge4PHfCpt6GH4H5lI=
"@types/object-fit-images@^3.2.3":
version "3.2.3"
resolved "https://registry.yarnpkg.com/@types/object-fit-images/-/object-fit-images-3.2.3.tgz#aa17a1cb4ac113ba81ce62f901177c9ccd5194f5"
integrity sha512-kpBPy4HIzbM1o3v+DJrK4V5NgUpcUg/ayzjixOVHQNukpdEUYDIaeDrnYJUSemQXWX5mKeEnxDRU1nACAWYnvg==
"@types/parse-json@^4.0.0": "@types/parse-json@^4.0.0":
version "4.0.0" version "4.0.0"
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
@ -8708,11 +8703,6 @@ object-assign@^4.1.1:
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
object-fit-images@^3.2.3:
version "3.2.4"
resolved "https://registry.yarnpkg.com/object-fit-images/-/object-fit-images-3.2.4.tgz#6c299d38fdf207746e5d2d46c2877f6f25d15b52"
integrity sha512-G+7LzpYfTfqUyrZlfrou/PLLLAPNC52FTy5y1CBywX+1/FkxIloOyQXBmZ3Zxa2AWO+lMF0JTuvqbr7G5e5CWg==
object-hash@^3.0.0: object-hash@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9"