-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SignaturePad not working with Create React App #257
Comments
@taylorlapeyre Thanks for the report. It's really strange, because it looks like instead of returning the actual JS code, it returns a path to a file, i.e. I'll try to find out what's wrong, but if anyone has any idea and could create a PR with a fix, it would be awesome. |
@taylorlapeyre I figured out what's wrong and I think it's actually a bug in |
@szimek ahh, that makes sense. I think that the fix should probably be in Create React App in this case. Do you want to make a PR over there? I can also take it if you give me a starting point to go off of 🙂 |
Just for the record - the workaround for us was simply directly copying the |
Thanks so much for the quick reply on this, @szimek. I work with @taylorlapeyre... Just forked the repo and changed the build process to write out a |
once again, huge props to @szimek for already taking this to CRA... doesn't look like they are very interested in supporting We could make a patch that exports the |
Yeah, however it might make sense to simply rename this file to |
A better workaround is to import directly the js file
|
Thank you for the workaround, importing from There is an official recommendation from Facebook as to how this could be handled. Thought I'd let you know. |
I haven't tried it yet, but |
Please reopen this issue if it's still a problem when using CRA 2 and the latest beta version of this library. |
Found a bug when attempting to use signature_pad with Webpack 2!
My project is using the newest version of Create React App. Using SignaturePad with previous versions of Create React App worked as expected, but a bug appeared when they upgraded to Webpack 2. Therefore, I am pretty confident that it specifically has to do with Webpack 2's new import/export mechanisms.
What is the current behavior?
When attempting to create a new instance of
SignaturePad
, the app crashes with a specific webpack-related error:What is the expected behavior?
The instance should be created as expected, without the crash.
Which versions of SignaturePad, and which browser / device are affected by this issue? Did this work in previous versions of SignaturePad?
This appears to happen in both Chrome and Safari.
The text was updated successfully, but these errors were encountered: