ui-cropper icon indicating copy to clipboard operation
ui-cropper copied to clipboard

Webpack + es6 module loading problem

Open roux1max opened this issue 6 years ago • 4 comments

Hi there ! First of all, I want to say that this problem seems to be Webpack related so it is possible that there is nothing you can do :)

Depending on which file I import from the module I get the following error : "No createObjectURL function found to create blob url".

If I import ui-cropper simply by importing the module and injecting it, I get the error.

import uiCropper from 'ui-cropper';

angular.module('myModule', [uiCropper]);

But if I import directly the unminimified compiled file, everything seems to work fine :

import 'ui-cropper/compile/unminified/ui-cropper';

angular.module('myModule', ['uiCropper']);

I did not do a lot of tests about it so I am unsure where the problem is coming from but I figured I should bring it up to you.

My environment :

  • webpack: ^2.5.0
  • babel for compilation with
    • babel-core: ^6.24.1
    • babel-loader: ^7.0.0
    • babel-plugin-transform-object-rest-spread: ^6.23.0
    • babel-preset-env: ^1.5.0

Let me know if you can reproduce it.

roux1max avatar Sep 04 '18 09:09 roux1max

personally I don't use webpack with that cropper, so I can't help you.

CrackerakiUA avatar Sep 04 '18 11:09 CrackerakiUA

Ok ! I was wondering it may come from the ES6 module export from the module or if it was from my webpack config.

roux1max avatar Sep 05 '18 07:09 roux1max

we don't have any ES6 code in the plugin, I haven't checked the submodules which we use.

CrackerakiUA avatar Sep 05 '18 17:09 CrackerakiUA

Seems to be a duplicate of https://github.com/CrackerakiUA/ui-cropper/issues/84

jameschristopher avatar Nov 07 '18 03:11 jameschristopher