Closed srdjag closed 5 years ago
FIXED
I managed to fix this by adding the following code:
head: { script: [{ src: "/browser-image-compression.js" }] }
in Vue compontent.
Then, download https://cdn.jsdelivr.net/npm/browser-image-compression@1.0.5/dist/browser-image-compression.js script and put it in static folder.
While working in Nuxt, if I import imageCompression from "browser-image-compression"; into a compontent (page), a single page reload/refresh will throw File not defined error and freeze that window. This is how it looks, every now and then it shows the actual error if it does not freeze by then.