-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems there would be one more drawback. How to handle fs? #16
Comments
I don't understand what you are talking about. |
The followings are server-side codes. translations/index.js
getLocaleMessages.js
|
So, what you're saying is that |
No, it is not the case. Maybe i provide a more simple example. |
So, you're saying that Webpack substitutes |
My client side would not run those codes. After webpack bundled, I found the server side __dirname always equal to '/', but it could be printed correctly in startup file which is not bundled by webpack. |
Then you can move React rendering to a separate service and that would solve your issue
Then that's what Webpack does for |
o.... My bad. Found solution by setting this option to webpack. |
(this workaround is now part of the library since several people requested it) |
Using universal-webpack, seems the whole server will be bundled.
In my case, there is a file using require-directory which may lookup a directory to require all the files.
Since the server is bundled, the lookup path will be different and of course the system cannot find the right directory to require the files as they are also bundled.
What is the recommend way to handle this?
The text was updated successfully, but these errors were encountered: