Closed BuddhiWathsala closed 5 years ago
The problem is that the author didn't include the precompiled ES5 code in the package but instead just pointed the main
parameter of package.json
to "./src/index.js"
, which is ES6 (your webpack will not transpile the code sitting under node_modules
). The workaround would be just to include the code from index.js
as a regular component in your project. You will have to include the helper.js
as well as the CSS from index.css
. One of the benefits of this approach is that you can freely migrate the component to Material-UI v1 on your own.
I got an error as below when I try to use
material-ui-dropzone
in ReactJsHere is my
webpack.config.js
file.And here my
package.json
file.