fengyuanchen / cropper

⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-cropper
MIT License
7.75k stars 1.74k forks source link

>3.1 使用webpack构建时提示依赖rollup-plugin-babel #928

Closed Yusoo closed 7 years ago

Yusoo commented 7 years ago

我只引入了cropper\dist\cropper.css,并不需要使用rollup-plugin-babel,但由于cropper文件夹下面有postcss.config.js,postcss-loader会自动去读取,导致构建时提示依赖rollup-plugin-babel。

frutality commented 7 years ago

Also having this error after update to latest version from 2.3.4: Error: Cannot find module 'rollup-plugin-babel. It's when I execute webpack --progress --watch command.

fengyuanchen commented 7 years ago

Please install with npm install cropper which will not include the postcss.config.js.

Yusoo commented 7 years ago

@fengyuanchen 就是用npm安装的

frutality commented 7 years ago

@fengyuanchen please provide more info.

Both packages (cropper and cropperjs) include postcss.config.js. However, I removed cropper from disk and installed it again with npm install cropper. It's the same.

May it be something with npm&node versions? I'm using node v6.10.2, npm 3.10.10.

fengyuanchen commented 7 years ago

Works fine in NPM v5.3.0. Try to upgrade NPM first:

npm i -g npm
frutality commented 7 years ago

Upgraded to 5.5.1. Didn't help. Maybe webpack upgrade can help. I'll try it in a few days. Can't do it right now because webpack update will broke something for sure.

I didn't mention this, but even with this error, cropper works just fine. It's just irritably when I see that error message.

Ryuurock commented 7 years ago

我就说了有这个问题嘛,作者还说我网络问题,我单独起一个目录去安装 还是这样 依赖没有自动安装

fengyuanchen commented 7 years ago

Please update to v3.1.2 which has fixed this.