Skip to content

Large builds because of process.env #915

Closed
@sheerun

Description

@sheerun

As mentioned in #807 (comment)

Description

Such approach can result in large development builds, if process.env.NODE_ENV is used frequently in code.. I't because each time it becomes { whole: "config", NODE_ENV: "dev", ... }.NODE_ENV.

Expected behavior

I think the better approach is to create definitions for both, so we get short aliases if possible and at the same time process.env is fully supported. That is create both mappings:

process.env.FOOBAR = 'xxx';
process.env = { FOOBAR: 'xxx' };

for each defined FOOBAR variable.

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