Skip to content

ionic 4 - prefix CDN domain before svg path of ionic components  #1056

Open
@pravesh364

Description

@pravesh364

I am serving my application's "index.html" file from a different domain and my ionic application is hosted on CDN domain.

Build Command
ng build --prod --aot --build-optimizer --output-hashing none --deploy-url https://myappv1.mycdn.in/.

Here --deploy-url is my CDN domain.

Current behavior:
When I am using <ion-back-button defaultHref="/"></ion-back-button> it's loading *.svg file dynamically. Whom path is related to "base-href" tag or hosted domain.

Expected behavior:
I want to prefix CDN domain before all *.svg file which is dynamically generating by ionic components so *.svg path will not be pointed to the hosted domain.

Problem Statement
Not getting the option to prefix CDN domain before *.svg file which is dynamically getting loaded by ionic components.

I am able to prefix the CDN domain before "assets" folder files but not able to do the same with ionic components related svg file. Because I don't know the entry point of the same.

Proposed/Expected solution
All ionic components lazy loaded files should have prefixed --deploy-url path. For example if my --deploy-url https://myappv1.mycdn.in/ is while building my app. Svg file path of ionic components should be like https://myappv1.mycdn.in/svg/md-arrow-back.svg.

Ionic Info
Ionic CLI: 4.10.3
Angular CLI: 7.3.3
Node: 10.15.1
Npm: 6.8.0
OS: darwin x64 (macOs Mojave, Version: 10.14.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssues that are suitable for a community contributortype: bugA bug in the functionality of Ionicons

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions