Skip to content

Provide require() in console #67

Closed

Description

@gaearon

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

Still not too bad!

Activity

  1. eanplatter commented on Jul 24, 2016

    @eanplatter
    Contributor

    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.

  2. gaearon commented on Jul 24, 2016

    @gaearon
    ContributorAuthor

    Yea, it's for debugging individual modules when something specific doesn't quite work, and you want to call it directly.

  3. eanplatter commented on Jul 24, 2016

    @eanplatter
    Contributor

    screen shot 2016-07-24 at 9 04 53 am

    This is freaking handy indeed!

  4. vjeux commented on Jul 24, 2016

    @vjeux
    Contributor

    You can try it out on facebook.com fyi, it's super useful for debugging

  5. gaearon commented on Sep 3, 2016

    @gaearon
    ContributorAuthor

    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.

  6. locked and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions