surveyjs / custom-widgets

The collection of custom widgets for SurveyJS: Survey Library and Survey Creator :package:
https://surveyjs.io
MIT License
79 stars 77 forks source link

signature pad not working for webpack 2.9.4 #126

Closed sumitlearnt closed 4 years ago

sumitlearnt commented 5 years ago

I just upgraded react project and the signature pad stopped working suddenly with the following error TypeError: __WEBPACK_IMPORTED_MODULE_0_signature_pad___default.a is not a constructor

  1132 | var rootWidget = this;
  1133 | var canvas = el.getElementsByTagName("canvas")[0];
  1134 | var buttonEl = el.getElementsByTagName("button")[0];
> 1135 | var signaturePad = new __WEBPACK_IMPORTED_MODULE_0_signature_pad___default.a(canvas);
       | ^  1136 | 
  1137 | if (question.isReadOnly) {
  1138 |   signaturePad.off();

Its for both survey creater and survey viewer . What is the solution for this?

tsv2013 commented 5 years ago

Please check this thread for more details - https://surveyjs.answerdesk.io/ticket/details/T2115

tsv2013 commented 4 years ago

I've just checked our https://github.com/surveyjs/surveyjs_react_quickstart repository. It works ok with webpack 3.8.1. If you still have the issue, please provide us with a minimal sample to reproduce the issue on our side.