meteor-css-modules
meteor-css-modules copied to clipboard
React-toolbox on both client and server
Hi Nathan,
Sorry to bother again. I usually put my app-code in a directory called app
so flowrouter-ssr
can render it. However, when doing this with react-toolbox I get this error:
Cannot find module './style'
Putting everything back in client
works.
This is probably related to #10 or #12 I guess.
(Doing this on Meteor 1.3.1)
Definitely not a bother! :smile:
Can you share a repro so I can see exactly what you're seeing?
Thanks!
Sure, here you go: https://github.com/TimBroddin/app-dir-bug
If you rename the app
dir to client
it works.
I couldn't try with 1.1.2 because Atmosphere hasn't built the packages for OS X yet.
Hi Nathan:
same issue here: when importing any react-toolbox module in an app component, if there is no parent 'client' folder (can be any level up), I get the standard error Cannot find module './style'
This probably means no SSR for now.
Tested with your meteor-react-toolbox-sample app and with own app, with Meteor 1.3.1
From my testing, I think Meteor must be handling the server-side files differently from the client-side. I need to dig back into Meteor's file handling for this. Hopefully I can address this this weekend.
Hi Nathan: Thanks and all the best solving this issue. I am really liking react-toolbox with css modules, it is a great setup for Meteor and react. I was also trying to install react-storybook to preview all react components and bumped into the same issue: the storybook local server cannot access all the app components since they must be in a client folder for now to work with css modules.
Have you tried this with the latest versions of Meteor and React Toolbox? Both have undergone quite a bit of changes so I'm wondering if this is still an issue.