-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Can't expose require created with Readable stream #908
Comments
Also while testing this, I came across some other strange behavior. If I create a bundle using I captured the behavior in a gist. It seems like Browserify is storing some state for subsequent calls to |
Experiencing the same issue. @lukekarrys Did you find a workaround? |
@mikalai-silivonik Unfortunately, I didn't find a workaround yet that allows a stream to be required. |
I'm running into this as well. Just spent three days trying to inject configuration prepared at build time. Everything seems to work (no errors), but code from the stream doesn't appear in bundled javascript. I'd be glad to hear about any solution - maybe another way to inject code generated in gulp script into a bundle? Obvious one is to dump it into temp file, but it doesn't seem very elegant. |
@lukekarrys You've correctly exposed the module, and Browserify will use it when generating the bundle. The error you're getting "Error: Cannot find module 'm1'" comes from What I recommend is to inform |
Thank you @terinjokes! That is soooo helpful 🎉 I'm gonna go ahead and close this since I now get that the issue isn't in browserify. |
I try, and often fail, to provide helpful answers. I regret when I don't, but glad to have made you happy here. 😄 |
I'm trying to add a readable stream to a bundle and then require it by the exposed name in
main.js
.main.js
The following code produces an error
Error: Cannot find module 'm1'
.Should this work?
The text was updated successfully, but these errors were encountered: