Closed arunoda closed 8 years ago
Closing since it's answered on the original question.
Which scope the browserify results is sent to is determined by where the file is in the app, or, the scopes specified by the package.js file in a package. So, for an app, put the file somewhere shared by both client and server and it'll be available to both. For a package, just specify both scopes in the api.addFiles() call.
The cosmos:browserify plugin doesn't pay attention to scopes at all. It just accepts files based on their name patterns and browserifies them.
This is related to this question on FlowRouter SSR: https://github.com/kadirahq/flow-router/issues/369
So, basically he is trying to use a browserify imported React component on the server. (via FlowRouter SSR). So, it seems to have undefined.
I assume,
Cosmos:Browserify
does not expose components to the client. Anyway does it?