chrvadala / react-svg-pan-zoom

:eyes: A React component that adds pan and zoom features to SVG

Home Page:https://chrvadala.github.io/react-svg-pan-zoom/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to minify the bundle.

250720806 opened this issue · comments

Bug reports:

When I use UglifyJs to compress JS File , I got this error:

Failed to minify the bundle. Error: 3.a7a04fb5.async.js from UglifyJs
Unexpected token: operator (>) [3.a7a04fb5.async.js:512,15059]
    at doneHandler (/var/jenkins_home/workspace/testmeetingkm/displayboard/node_modules/af-webpack/lib/build.js:91:27)

Because do NOT use @babel/plugin-transform-arrow-functions, file react-svg-pan-zoom.min.js include arrow functions. Please add babel plugin: @babel/plugin-transform-arrow-functions.

Thanks.

Hi,
this library uses babel/preset-env, so the following list of browser is supported out of the box:

and_chr 76
and_ff 68
and_qq 1.2
and_uc 12.12
android 76
baidu 7.12
chrome 77
chrome 76
chrome 75
chrome 74
edge 18
edge 17
firefox 69
firefox 68
firefox 60
ie 11
ie_mob 11
ios_saf 13
ios_saf 12.2-12.3
ios_saf 12.0-12.1
kaios 2.5
op_mini all
op_mob 46
opera 62
opera 60
safari 13
safari 12.1
samsung 9.2
samsung 8.2

It looks like you're using an old UglifyJs version that doesn't support arrow function. Can I suggest you to upgrade your library?