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
We should figure out a way to provide a global require() in DEV mode in the browser console.
It could be implemented as a webpack plugin (everything is a plugin in webpack right?)
It could work like this:
For modules with unique names, require('moduleName') just works
For modules with non-unique names, require('./full/path/from/root') is the only way
Closing for a lack of a specific proposal. It’s not clear how this would work with relative imports so unless somebody prototypes this, I likely won’t be working on it.
Activity
eanplatter commentedon Jul 24, 2016
What is the use case for this? So I can go to my dev tools console and access a module? That would be helpful, I'd like to dig into it.
gaearon commentedon Jul 24, 2016
Yea, it's for debugging individual modules when something specific doesn't quite work, and you want to call it directly.
eanplatter commentedon Jul 24, 2016
This is freaking handy indeed!
vjeux commentedon Jul 24, 2016
You can try it out on facebook.com fyi, it's super useful for debugging
gaearon commentedon Sep 3, 2016
Closing for a lack of a specific proposal. It’s not clear how this would work with relative imports so unless somebody prototypes this, I likely won’t be working on it.