Skip to content

Ability to detect within webpack if app is being built for release #4497

@cowboyd

Description

@cowboyd

Is your feature request related to a problem? Please describe.

We have a set of flags that we're passing to webpack in order to make decisions about the build... Thinks like --env.gateway and --env.bluetooth which we'd like to have different defaults depending on whether this is a debug build or a release build.

We haven't been able to find a documented way of determining at build time if we're building with --release

Describe the solution you'd like

A way to know within our webpack environment if we're building for release, or debug. That way, we can have a different set of defaults for our flags.

I would simulate this by passing an --env.profile=release, e.g.

$ tns build ios --release --env.profile=release

It would be nice to see if we couldn't keep these two in sync.

Describe alternatives you've considered

See above for alternatives ( a manually maintained --env.profile flag.
Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions