-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
fs option #143
Comments
webpack-dev-middleware is specifically made to handle and serve in-memory files. I don't understand your use case, could you explain that a bit more? |
@SpaceK33z sometimes i need to inject some config into process file during dev stage. With memory-fs i can't access files pass through middleware |
@otarim, is the config purely for the html files? You could use something like html-webpack-plugin and pass config parameters to the plugin. In the html file you could then display those with underscore templates. E.g. in your webpack config, add |
Also see #88. |
Hey, just came across this issue myself, so I found that the fs is exposed on the middleware here: webpack-dev-middleware/middleware.js Line 83 in 6b49341
And it's set here: webpack-dev-middleware/lib/Shared.js Line 92 in 6b49341
The problem I've found is that we can access the fs for the first render, but as the middleware is essentially setting an object reference - it doesn't update when we change it so I can't get a reference to the new FS. My use case is building a custom dev server for node-tailor which requires me to send the main js bundle through in a custom header. I have to restart the process to get the new file being sent through. This would be fixed by using a function to get the fs rather than relying on the object reference. EDIT Nvm - realised I was using v1.8 - this is fixed in v1.9. (Possibly wasn't broken in 1.8 but who knows!!!) |
hi @SimeonC - I'm trying to do an |
closing given the discussion and apparent resolution and issue age. please request a reopen if needs be. |
I build my app for client and server. But I can't require rebuilded server scripts because of memory-fs. Can you give me availability to use custom file-system library (e.g. fs)?
The text was updated successfully, but these errors were encountered: