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
In browserify <10.1.1 I could then use .add('rampage') just fine, now however it errors out:
Error: Cannot find module '*snip*/rampage' from '*snip*'
at *snip*/node_modules/browserify/node_modules/resolve/lib/async.js:55:21
at load (*snip*/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
at onex (*snip*/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
at *snip*/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
I can't test 10.1.1 to be certain because of the JSONStream changes, I can't even roll back to a working browserify version because of that as well. This was most definitely working in 10.1.0 though.
The text was updated successfully, but these errors were encountered:
This happened prior as reported in #1072 and was fixed, and in a previous browserify version as well.
Is this a non-standard usage of the field?
#1072 mentions a work-around using syntax like .require('./rampage/static-dev/js/rampage.js', {'expose': 'rampage'}) which I can confirm works with 10.1.2, I would just prefer to have the alias in package.json instead of my build files, but if I have to swap I will.
#1072 was about doing b.require('thing-in-browser-field') and as I mentioned there, that usage was not documented and did not appear to have test coverage either. So unless and until it gained those things, I consider it an accident.
Doing b.add('thing-in-browser-field') is likewise not documented and apparently doesn't have test coverage either. Furthermore, there's now the uncertainty in #1248 about whether b.add('some-module-not-in-browser-field') is even supposed to work.
#1072 mentions a work-around using syntax like .require('./rampage/static-dev/js/rampage.js', {'expose': 'rampage'}) which I can confirm works with 10.1.2
That is also not documented. See #1137. I would consider using the workaround I suggested in #1072 (comment) for now:
In package.json I have
In browserify <10.1.1 I could then use .add('rampage') just fine, now however it errors out:
I can't test 10.1.1 to be certain because of the JSONStream changes, I can't even roll back to a working browserify version because of that as well. This was most definitely working in 10.1.0 though.
The text was updated successfully, but these errors were encountered: