From 30eebe2a98530c031e8703b738a232179f92d137 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Tue, 16 Mar 2021 16:13:48 +1100 Subject: [PATCH] Added pointer events shim --- package.json | 1 + src/index.js | 5 +++++ yarn.lock | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/package.json b/package.json index b2cd400..09b2f11 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "lodash.get": "^4.4.2", "lodash.set": "^4.3.2", "normalize-wheel": "^1.0.1", + "pepjs": "^0.5.3", "polygon-clipping": "^0.15.1", "pretty-bytes": "^5.4.1", "raw.macro": "^0.4.2", diff --git a/src/index.js b/src/index.js index 36356c6..29e2ee8 100644 --- a/src/index.js +++ b/src/index.js @@ -11,6 +11,11 @@ import * as serviceWorker from "./serviceWorker"; import "./index.css"; +// Pointer events shim +if (!("PointerEvent" in window)) { + import("pepjs"); +} + console.log( "env", process.env, diff --git a/yarn.lock b/yarn.lock index ceb1598..f1ce51e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8837,6 +8837,11 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" +pepjs@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/pepjs/-/pepjs-0.5.3.tgz#dc755f03d965c20e4b1bb65e42a03a97c382cfc7" + integrity sha512-5yHVB9OHqKd9fr/OIsn8ss0NgThQ9buaqrEuwr9Or5YjPp6h+WTDKWZI+xZLaBGZCtODTnFtlSHNmhFsq67THg== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"