Closed FangerZero closed 4 years ago
You should import like this:
import imageCompression from 'browser-image-compression';
Please a look at a working React example here: https://github.com/Donaldcwl/browser-image-compression/tree/master/example/React%20App
I was trying to use this, but after installing I can't seem to import the module? I don't really understand how to even do what people are saying because they just say thing's like create a d.ts file and declare it there. What does that even mean?
I've had to import it like this
import imageCompression from "../../../../node_modules/browser-image-compression/dist/browser-image-compression";