Skip to content

Question related to console warning #1298

Closed
@dahei

Description

@dahei

This is related to #1029

We use grunt-env and grunt-browserify to bundle our build. Babel(ify) is used for transpiling.

When I create our production build, I set NODE_ENV via grunt-env to "production" . The resulting bundle gets also unglified afterwards.

The minified bundle is significantly smaller than without using grunt-env, so it seems, browserify is aware of the NODE_ENV and is building a "production" version.

Alls runs fine on our local servers. No warning in the js-console.

When building the same app via Jenkins on our staging-server (which just executes npm install and grunt), the resulting main.js leads to the warning introduced in #1029, while running in the browser.

As I log the process.env.NODE_ENV during the grunt build, I can also see, that it is "production". The bundled js File has the exact same size, as I would build it on my local machine.

So I am confused, what exactly this warning is all about. As far as I unterstand envify isn't really necessary -> http://stackoverflow.com/a/25752661/1574484

Why is the warning not on my local machine, although the same grunt build was applied?

Maybe someone could explain the backgrounds of this envify/NODE_ENV thing?

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