Been trying to implement this plugin to test React out as a templating system for HTML. Using a hashed source file, I'm able to access "main" just fine in my directory structure, but no matter what I use inside of index.jsx, I'm unable to require any of my other components in.
I keep getting the generic Error: Cannot find module "./src/html/components/head.jsx" error. I didn't see any examples to play with and there's no mention of MyComponent.jsx anywhere else in the README other than you requiring it into index.jsx. I assumed the require path would be relative to the location of my index.jsx file, but that doesn't seem to be the case with this plugin.
So I was able to resolve this by messing around with webpack's resolve.root object. Just wanted to put this here in case someone else runs across this issue.
Been trying to implement this plugin to test React out as a templating system for HTML. Using a hashed source file, I'm able to access "main" just fine in my directory structure, but no matter what I use inside of index.jsx, I'm unable to require any of my other components in.
I keep getting the generic
Error: Cannot find module "./src/html/components/head.jsx"
error. I didn't see any examples to play with and there's no mention of MyComponent.jsx anywhere else in the README other than you requiring it into index.jsx. I assumed the require path would be relative to the location of my index.jsx file, but that doesn't seem to be the case with this plugin.Any ideas?