I am currently in the process of incorporating material-ui (material-ui.com) JavaScript into my project to utilize its React components. To streamline this process, I have been utilizing browserify to consolidate all the JavaScript files into a single one that I then link in my HTML document. Within the material-ui/lib directory where the JSX-transformed JS resides (a realm that is still relatively new to me regarding NPM bundles and browserify procedures), I execute:
browserify index.js -o material-ui.js -r material-ui
Subsequently, I embed the generated material-ui.js file within my HTML structure.
However, upon attempting to invoke require('material-ui') within my JavaScript code on the HTML page, I encounter an error stating "Cannot find module 'material-ui'".
I am struggling to comprehend the precise roles of browserify and the require function, as well as the correct method for referencing any of the material-ui react classes. Assistance would be greatly appreciated! Thanks!