In browser mode or in normal build the drawing works properly.
But when you build in --prod or --prod --release does not succeed in drawing and gives the following error
vendor.js:1 ERROR ReferenceError: a198254 is not defined
at a._calculateCurveControlPoints (10.js:1)
at a._addPoint (10.js:1)
at a._strokeUpdate (10.js:1)
at a._strokeMoveUpdate (10.js:1)
at HTMLCanvasElement._handleTouchMove (10.js:1)
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (vendor.js:1)
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)
at e.invokeTask [as invoke] (polyfills.js:3)
yes it work in ionic serve and device to. with “ionic cordova build android” or "ionic cordova build android --release"
the problem is in the --prod
i try to build in --release without --prod and its work fine in device
but the build without prod is big and slow
tenks for your help
this the line from the build code 10.js
"m=n.x-(a198257.x+(r-d)*v),g=n.y-(a198257.y+(u-c)*v);"
and i search in all build pages and not define var like this : a198257
Ok, a198257 means something to me - I have seen a similar number being randomly inserted before, breaking code. I’ll see if I can find it and find out if there was a solution.
So @meni_oz, I had this exact issue on Monday night! I found when I was building with package-lock.json, I could proceed, without it, I could not which implied that there was a dependency update issue somewhere.
Long after trawling and figuring out what was different, uglify-js was the most likely candidate; @ionic/app-scripts relies on uglify-es which is a distribution of uglify-js. @ionic/app-scripts has a loose dependency of 3.x. A few days ago, uglify-js@3.2.0 was released after an upgrade from uglify-js@3.1.0 so I figured this was the problem!
I manually installed uglify-js@3.1.0 (see below for instructions), and the problem went away.`
tl;dr
A dependency, uglify-js@3.2.0, causes a problem, install uglify-js@3.1.0 by running the following command in your Ionic project.
npm i uglify-js@3.1.0
That worked for me I dunno who the bug lies with, so I might raise it to uglify-js, ionic-app-scripts and the signature-pad…
no its not work for me
i installed older version of app-scripts ( @ionic/app-scripts@1.3.0) and angular 4 and everything back to works perfect
I sat for hours trying to solve it until I gave up
Thanks anyway