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
Webpack? #99
Comments
Try this: import rough from 'roughjs/dist/rough.umd'; |
Thanks ... moving foward! |
Thanks for the help @jeasonstudio |
for roughjs v4.3.1 import rough from 'roughjs/bundled/rough.cjs'; |
for roughjs v4.3.1 import rough from 'roughjs/bundled/rough.esm.js' |
A lot of it comes from the fact that webpack pays attention to the "browser" field in the package.json over "module" field. |
I am working on a Next Js application and have tried both @guimeisang and @Cosmitar's solutions for roughjs v4.3.1. I get this error:
|
Its the same issue for me @hamza1220 . have you got it working with next?? |
I have the same issue with next |
@Rameshv did you get it to work with next? |
not working with React I believe. |
Versions
roughjs@3.0.0
webpack@4.29.4
I am trying to use roughjs with webpack. (Actually using webpacker, as main app is a Rails application)
I have tried using rough.svg and rough.canvas, and I end up getting this error (or the same for canvas) every time:
TypeError: roughjs_dist_rough__WEBPACK_IMPORTED_MODULE_0___default.a.svg is not a function
from this:
called here:
I have tried several variations on this without luck.
I can create an svg without roughjs, and add it to the document.
Thanks for any thoughts on where I am going wrong.
The text was updated successfully, but these errors were encountered: