You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make file available from outside the bundle with require(file).
This doesn't communicate any relationship between b.require()d files and other files in the same bundle. However, people frequently use b.require() to expose a file under an alias that they then use to require the file in other files in the bundle, e.g.:
I believe some of browserify's tests of b.require() even rely on that.
If that behavior is intended it should be documented, and if it's not intended the documentation should note that to make it clear. I think it's a useful feature, if it doesn't interfere with any other use cases. There is currently a lot of flakiness in browserify about matching up values passed / configured via things like b.require(), require() calls in bundled files, browser field etc. though, so getting the documentation tightened up re: what should happen would be very beneficial.
The text was updated successfully, but these errors were encountered:
The documentation for
b.require()
says:This doesn't communicate any relationship between
b.require()
d files and other files in the same bundle. However, people frequently useb.require()
to expose a file under an alias that they then use to require the file in other files in the bundle, e.g.:bundler.js
entry.js
I believe some of browserify's tests of
b.require()
even rely on that.If that behavior is intended it should be documented, and if it's not intended the documentation should note that to make it clear. I think it's a useful feature, if it doesn't interfere with any other use cases. There is currently a lot of flakiness in browserify about matching up values passed / configured via things like
b.require()
,require()
calls in bundled files,browser
field etc. though, so getting the documentation tightened up re: what should happen would be very beneficial.The text was updated successfully, but these errors were encountered: