vue-dropzone icon indicating copy to clipboard operation
vue-dropzone copied to clipboard

ES5 Compatiblitiy

Open oh-yeah opened this issue 6 years ago • 9 comments

ES5 Compatibility changes for IE, fixes #439. I just converted arrow functions to regular functions and other small changes to get the library running on IE.

I currently use Azure, so I'm unable to test any AWS specific code.

oh-yeah avatar Jul 25 '19 16:07 oh-yeah

This seems like a really good and simple fix @oh-yeah - I'll try and take a look over the next few nights and get it merged in and released.

rowanwins avatar Aug 03 '19 03:08 rowanwins

Hi @rowanwins!

First of all thank you so much for having created this component, it is very useful for a project I am working on at the moment!

Also wanted to say that I am very much looking forward to seeing this PR released, as we need to have our project compatible with Internet Explorer. Thanks again for your efforts!

jmariller avatar Aug 06 '19 08:08 jmariller

@rowanwins Any luck implementing this fix?

ghost avatar Aug 15 '19 18:08 ghost

+1

XGhozt avatar Oct 09 '19 03:10 XGhozt

Hi you can fork @oh-yeah work and build and replace in your package.json "vue2-dropzone": "git+https://github.com/yourRepo/vue-dropzone.git",

Actually i use this tips.

starker-xp avatar Oct 09 '19 07:10 starker-xp

Actually this PR is broken. I just ran some tests. vue-dropzone.vue comes back saying processFile doesn't exist, and urlsigner.js errors with object type conversion. I was able to fix on my own, but I'm not sure I did it in the best way.

https://github.com/XGhozt/vue-dropzone/commit/5882341af420fab84d2b074d0578c0a468aa0786 https://github.com/XGhozt/vue-dropzone/commit/c3006af4ef43b6ce9a6216d8b1b2dd5c71d9fbfb

XGhozt avatar Oct 09 '19 07:10 XGhozt

Changing

data() { ... }

to

data: function() { ... }

breaks scoping and shouldn't be required in the first place.
The easier solution would be to handle transpiling with a build step.

Etheryte avatar Oct 09 '19 11:10 Etheryte

It's not appropriate to force this package back to ancient Javascript standards just because you have to support an ancient, garbage browser. Use Babel to transpile the code to ES5 or whatever you need. Make sure it's not in your exclusion list if you use Webpack (node_modules usually is).

Worst-case, the package should be modified to use Babel in its build step to generate ES5 dist files. The source code should not be modified.

hackel avatar Feb 27 '20 22:02 hackel

I agree with @hackel. project requirements might change so instead of shipping code for IE11 , we can simply expose src directory and allow user build config to take over. only drawback is for users , who is using vue-dropzone from cdn(direct script tag).I think most of the projects which needs ie supports uses some sort of build setup or cli.In any case, I think we should expose src dir in pkg.json file.

I have created pull request:- please review. https://github.com/rowanwins/vue-dropzone/pull/534

For people who want IE11 ASAP. look into patch-package(https://www.npmjs.com/package/patch-package)

sudhakarselva avatar Jun 08 '20 12:06 sudhakarselva