ui-cropper
ui-cropper copied to clipboard
Webpack + es6 module loading problem
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.
personally I don't use webpack with that cropper, so I can't help you.
Ok ! I was wondering it may come from the ES6 module export from the module or if it was from my webpack config.
we don't have any ES6 code in the plugin, I haven't checked the submodules which we use.
Seems to be a duplicate of https://github.com/CrackerakiUA/ui-cropper/issues/84