Skip to content

Make process requireable #157

Closed
Closed
@andrewdeandrade

Description

@andrewdeandrade

Ideally (IMHO) there would be no globals besides the 4 node keywords required for the module system to function: require, module, __dirname and __filename.

For many of the other modules that are typically globals, you can require them out of the box, such as

var console = require('console');
var setTimeout = require('timers').setTimeout; // same with clearTimeout, setInterval and clearInterval
var Buffer = require('buffer');
// etc...

One of the few standard parts of node that cannot be loaded via require() is process.

The popularity of this npm module: https://www.npmjs.com/package/process , with almost a million downloads in the last month shows that a lot of people would benefit from having process be requireable. By making it requireable, browserify can then treat it as one of the special compatibility modules and list it here: https://github.com/substack/node-browserify#compatibility

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