Skip to content

Conditional build:remove depending on environment #29

@intellix

Description

@intellix

So I have an Angular app and 1.3 requires you to specify a <base href="/">.
The problem is that if I want to wrap my app for iOS using Cordova, that tag breaks all resources, so it needs to be removed only when building for Native.

If I do the following, then it gets removed every time, even when needed for production:

<!-- build:remove -->
<base href="/">
<!-- endbuild -->

What do you think? Is there already a way to achieve this? I thought it would look something like the following:

var options = {
    native: true/false
};
useref(options);
<!-- build:remove if(native) -->
<base href="/">
<!-- endbuild -->

<!-- build:remove if(!native) -->
<script id="cordova-js" src="cordova.js"></script>
<!-- endbuild-->

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions